org.apache.log4j
クラス SimpleLayout

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

public class SimpleLayout
extends Layout

SimpleLayout consists of the priority of the log statement, followed by " - " and then the log message itself. For example,

SimpleLaoutは、ログステートメントの優先度、後に続く"-"、それからログメッセージから成り立っています。 例えば、

DEBUG - Hello world

導入されたバージョン:
version 0.7.0

PatternLayout offers a much more powerful alternative.

PatternLayout は、最高にパワフルな選択肢を与えてくれます。

作成者:
Ceki Gülcü

クラス org.apache.log4j.Layout から継承したフィールド
LINE_SEP, LINE_SEP_LEN
 
コンストラクタの概要
SimpleLayout()
           
 
メソッドの概要
 void activateOptions()
          Activate the options that were previously set with calls to option setters.
 String format(LoggingEvent event)
          Returns the log statement in a format consisting of the priority, followed by " - " and then the message.
 String[] getOptionStrings()
          Return list of strings that the OptionHandler instance recognizes.
 boolean ignoresThrowable()
          The SimpleLayout does not handle the throwable contained within LoggingEvents.
 void setOption(String option, String value)
          Set option to value.
 
クラス org.apache.log4j.Layout から継承したメソッド
getContentType, getFooter, getHeader
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

SimpleLayout

public SimpleLayout()
メソッドの詳細

getOptionStrings

public String[] getOptionStrings()
インタフェース OptionHandler の記述:
Return list of strings that the OptionHandler instance recognizes.

OptionHandlerインスタンスが認識する文字列のリストを返します。


setOption

public void setOption(String option,
                      String value)
インタフェース OptionHandler の記述:
Set option to value.

オプション に設定します。

The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when OptionHandler.activateOptions() is called.

各オプションの処理は、OptionHandlerのインスタンスに依存します。 いくつかのオプションは、直ぐに有効になりますが、その他は OptionHandler.activateOptions()が呼ばれる時にだけ有効になります。


activateOptions

public void activateOptions()
インタフェース OptionHandler の記述:
Activate the options that were previously set with calls to option setters.

オプションセッタを使い、前もって設定されていたオプションをアクティブにします。

This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.

これにより、全てのオプションが設定されてしまうまでに、オプションの活性化を先に延ばすことができます。 これには、関連するオプションをもつコンポーネントが要求されますが、全てが設定されるまで、曖昧のままです。

For example, the FileAppender has the File and Append options both of which are ambigous until the other is also set.

例えば、FileAppenderは、FileAppend の2つのオプションを持っていますが、その他のオプションもセットされるまで曖昧です。


format

public String format(LoggingEvent event)
Returns the log statement in a format consisting of the priority, followed by " - " and then the message. For example,
 INFO - "A message"

優先度、後続の "-" それから、メッセージのフォーマット定数使ったログステートメント返します。 例えば、

 INFO - "A message"

The category parameter is ignored.

categoryパラメタは無視されます。

オーバーライド:
クラス Layout 内の format
戻り値:
A byte array in SimpleLayout format.

SimpleLayoutフォーマット内のバイト配列


ignoresThrowable

public boolean ignoresThrowable()
The SimpleLayout does not handle the throwable contained within LoggingEvents. Thus, it returns true.

SimpleLayoutは、LoggingEvents内に含まれるthrowableを処理しません。 したがって、trueを返します。

オーバーライド:
クラス Layout 内の ignoresThrowable
導入されたバージョン:
version 0.8.4


Please notify me about new log4j releases.