org.apache.log4j
クラス HTMLLayout

java.lang.Object
  |
  +--org.apache.log4j.Layout
        |
        +--org.apache.log4j.HTMLLayout
すべての実装インタフェース:
OptionHandler

public class HTMLLayout
extends Layout

This layout outputs events in a HTML table.

このレイアウトは、HTMLのテーブル内にイベントを出力します。

作成者:
Ceki Gülcü

フィールドの概要
protected  int BUF_SIZE
           
static String LOCATION_INFO_OPTION
          推奨されていません。 Options are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term.

オプションは、現状、JavaBeanパラダイムを使うことで処理されます。 この定数は、今後必要なくなり、近いうちに削除される予定です。

protected  int MAX_CAPACITY
           
static String TITLE_OPTION
          A string constant used in naming the option for setting the the HTML document title.
 
クラス org.apache.log4j.Layout から継承したフィールド
LINE_SEP, LINE_SEP_LEN
 
コンストラクタの概要
HTMLLayout()
           
 
メソッドの概要
 void activateOptions()
          No options to activate.
 String format(LoggingEvent event)
          Implement this method to create your own layout format.
 String getContentType()
          Returns the content type output by this layout, i.e "text/html".
 String getFooter()
          Returns the appropriate HTML footers.
 String getHeader()
          Returns appropriate HTML headers.
 boolean getLocationInfo()
          Returns the current value of the LocationInfo option.
 String[] getOptionStrings()
          推奨されていません。 We now use JavaBeans introspection to configure components. Options strings are no longer needed.

今日、私たちは、コンポーネントの設定では、JavaBeansのイントロスペクションを使っています。 オプション文字列は、今後、必要なくなります。

 String getTitle()
          Returns the current value of the Title option.
 boolean ignoresThrowable()
          The HTML layout handles the throwable contained in logging events.
 void setLocationInfo(boolean flag)
          The LocationInfo option takes a boolean value.
 void setOption(String key, String value)
          推奨されていません。 Use the setter method for the option directly instead of the generic setOption method.

汎用的なsetOptionメソッドの代わりに直接オプションに関するセッターメソッドを利用します。

 void setTitle(String title)
          The Title option takes a String value.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

BUF_SIZE

protected final int BUF_SIZE

MAX_CAPACITY

protected final int MAX_CAPACITY

LOCATION_INFO_OPTION

public static final String LOCATION_INFO_OPTION
推奨されていません。 Options are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term.

オプションは、現状、JavaBeanパラダイムを使うことで処理されます。 この定数は、今後必要なくなり、近いうちに削除される予定です。

A string constant used in naming the option for setting the the location information flag. Current value of this string constant is LocationInfo.

位置情報フラグを設定するためのオプションを指定する時に使う文字列定数です。 この文字列定数の現状の値は、LocationInfoです。

Note that all option keys are case sensitive.

全てのオプションキーは、大文字と小文字の区別をするのに気をつけてください。


TITLE_OPTION

public static final String TITLE_OPTION
A string constant used in naming the option for setting the the HTML document title. Current value of this string constant is Title.

HTMLドキュメントのタイトルを設定するためのオプションを指定する時に使う文字列定数です。 この文字列定数の現在の値は、Titleです。

コンストラクタの詳細

HTMLLayout

public HTMLLayout()
メソッドの詳細

getOptionStrings

public String[] getOptionStrings()
推奨されていません。 We now use JavaBeans introspection to configure components. Options strings are no longer needed.

今日、私たちは、コンポーネントの設定では、JavaBeansのイントロスペクションを使っています。 オプション文字列は、今後、必要なくなります。

Returns a String consisting of one element LOCATION_INFO_OPTION.

ひとつの要素 LOCATION_INFO_OPTIONの文字列定数を返します。


setOption

public void setOption(String key,
                      String value)
推奨されていません。 Use the setter method for the option directly instead of the generic setOption method.

汎用的なsetOptionメソッドの代わりに直接オプションに関するセッターメソッドを利用します。

Set HTMLLayout specific options.

The LocationInfo option takes a boolean value. By default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.

LocationInfoオプションは、論理値をとります。 デフォルトでは、このレイアウトによる出力先の位置情報がないというのを表すfalaseが設定されています。 もし、オプションがtrueに設定されている場合、その時は、ログステートメントの起点でファイル名とステートメントの行番号が出力されます。

If you are embedding this layout within an SMTPAppender then make sure to set the LocationInfo option of that appender as well.

もしあなたがSMTPAppender内でこのレイアウトを埋め込んだ場合、その時、同様にそのアペンダのLocationInfoオプションを設定することを確信してください。


setLocationInfo

public void setLocationInfo(boolean flag)
The LocationInfo option takes a boolean value. By default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.

LocationInfoオプションは、論理値をとります。 デフォルトでは、このレイアウトにより出力される位置情報はないというこを表す、falseが設定されています。 もし、このオプションがtrueであれば、その時は、ログステートメントの起点でファイル名およびステートメントの行番号が出力されます。

If you are embedding this layout within an SMTPAppender then make sure to set the LocationInfo option of that appender as well.

もしあなたがSMTPAppender内でこのレイアウトを埋め込んだ場合、その時、同様にそのアペンダのLocationInfoオプションを設定することを確信してください。


getLocationInfo

public boolean getLocationInfo()
Returns the current value of the LocationInfo option.

LocationInfoオプションの現在の値を返します。


setTitle

public void setTitle(String title)
The Title option takes a String value. This option sets the document title of the generated HTML document.

Titleオプションは、文字列の値を取ります。 このオプションは、生成されたHTMLドキュメントのドキュメントタイトルを設定します。

Defaults to 'Log4J Log Messages'.

デフォルトでは、'Log4J Log Message' です。


getTitle

public String getTitle()
Returns the current value of the Title option.

Titleオプションの現在の値を返します。


getContentType

public String getContentType()
Returns the content type output by this layout, i.e "text/html".

このレイアウトにより出力されるコンテントタイプ。 例えば、"text/html"

オーバーライド:
クラス Layout 内の getContentType

activateOptions

public void activateOptions()
No options to activate. 有効なオプションはありません。

format

public String format(LoggingEvent event)
クラス Layout の記述:
Implement this method to create your own layout format.

あなた自身でレイアウトフォーマットを作成するためには、このメソッドを実装します。

オーバーライド:
クラス Layout 内の format

getHeader

public String getHeader()
Returns appropriate HTML headers.

妥当なHTMLヘッダを返します。

オーバーライド:
クラス Layout 内の getHeader

getFooter

public String getFooter()
Returns the appropriate HTML footers.

妥当なHTMLフッタを返します。

オーバーライド:
クラス Layout 内の getFooter

ignoresThrowable

public boolean ignoresThrowable()
The HTML layout handles the throwable contained in logging events. Hence, this method return false.

HTMLレイアウトは、ロギングイベント内に含まれるthrowableを処理します。 したがって、このメソッドは、falseを返します。

オーバーライド:
クラス Layout 内の ignoresThrowable


Please notify me about new log4j releases.