org.apache.log4j
クラス Layout

java.lang.Object
  |
  +--org.apache.log4j.Layout
すべての実装インタフェース:
OptionHandler
直系の既知のサブクラス:
DateLayout, HTMLLayout, PatternLayout, SimpleLayout, XMLLayout

public abstract class Layout
extends Object
implements OptionHandler

Extend this abstract class to create your own log layout format.

あなた自身でログのレイアウトフォーマットを作成するためには、この抽象クラスを拡張します。

作成者:
Ceki Gülcü

フィールドの概要
static String LINE_SEP
           
static int LINE_SEP_LEN
           
 
コンストラクタの概要
Layout()
           
 
メソッドの概要
abstract  String format(LoggingEvent event)
          Implement this method to create your own layout format.
 String getContentType()
          Returns the content type output by this layout.
 String getFooter()
          Returns the footer for the layout format.
 String getHeader()
          Returns the header for the layout format.
abstract  boolean ignoresThrowable()
          If the layout handles the throwable object contained within LoggingEvent, then the layout should return false.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
インタフェース org.apache.log4j.spi.OptionHandler から継承したメソッド
activateOptions, getOptionStrings, setOption
 

フィールドの詳細

LINE_SEP

public static final String LINE_SEP

LINE_SEP_LEN

public static final int LINE_SEP_LEN
コンストラクタの詳細

Layout

public Layout()
メソッドの詳細

format

public abstract String format(LoggingEvent event)
Implement this method to create your own layout format.

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


getContentType

public String getContentType()
Returns the content type output by this layout. The base class returns "text/plain".

このレイアウトの出力のコンテントタイプを返します。 ベースクラスは、"text/plain" を返します。


getHeader

public String getHeader()
Returns the header for the layout format. The base class returns null.

レイアウトフォーマットに関するヘッダを返します。 ベースクラスは、null を返します。


getFooter

public String getFooter()
Returns the footer for the layout format. The base class returns null.

レイアウトフォーマットに関するフッタを返します。 ベースクラスは、null を返します。


ignoresThrowable

public abstract boolean ignoresThrowable()
If the layout handles the throwable object contained within LoggingEvent, then the layout should return false. Otherwise, if the layout ignores throwable object, then the layout should return true.

もし、レイアウトが LoggingEvent 内に含まれる throwable オブジェクトを処理する場合、レイアウトは、false を返す必要があります。 反対に、もし、レイアウトが throwable オブジェクトを無視する場合、レイアウトは、true を返す必要があります。

The SimpleLayout, TTCCLayout, PatternLayout all return true. The XMLLayout returns false.

SimpleLayoutTTCCLayoutPatternLayout の全てのクラスは、true を返します。 XMLLayout は、false を返します。

導入されたバージョン:
0.8.4


Please notify me about new log4j releases.