|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Object | +--org.apache.log4j.AppenderSkeleton
Abstract superclass of the other appenders in the package.
パッケージ内の他のアペンダーの抽象クラスです。
This class provides the code for common functionality, such as support for threshold filtering and support for general filters.
このクラスは、共通的な機能に関する、閾値フィルタリングのサポートや一般的なフィルターのサポートのようなコードを提供します。
| フィールドの概要 | |
protected boolean |
closed
Is this appender closed? |
protected ErrorHandler |
errorHandler
It is assumed and enforced that errorHandler is never null. |
protected Filter |
headFilter
The first filter in the filter chain. |
protected Layout |
layout
The layout variable does not need to be set if the appender implementation has its own layout. |
protected String |
name
Appenders are named. |
protected Filter |
tailFilter
The last filter in the filter chain. |
protected Priority |
threshold
There is no priority threshold filtering by default. |
static String |
THRESHOLD_OPTION
推奨されていません。 Options are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term. オプションは、現在JavaBeansのパラダイムで使うために処理されます。 この不変数は、もはや必要とされません。そして、近いうちに削除される予定です。 |
| コンストラクタの概要 | |
AppenderSkeleton()
|
|
| メソッドの概要 | |
void |
activateOptions()
Derived appenders should override this method if option structure requires it. |
void |
addFilter(Filter newFilter)
Add a filter to end of the filter list. |
protected abstract void |
append(LoggingEvent event)
Subclasses of AppenderSkeleton should implement this
method to perform actual logging. |
void |
clearFilters()
Clear the filters chain. |
void |
doAppend(LoggingEvent event)
This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific append(org.apache.log4j.spi.LoggingEvent) method.
|
void |
finalize()
Finalize this appender by calling the imlenentation's close method.
|
ErrorHandler |
getErrorHandler()
Return the currently set ErrorHandler for this
Appender.
|
Filter |
getFilter()
Returns the head Filter. |
Filter |
getFirstFilter()
Return the first filter in the filter chain for this Appender. |
Layout |
getLayout()
Returns the layout of this appender. |
String |
getName()
Returns the name of this FileAppender. |
String[] |
getOptionStrings()
推奨されていません。 We now use JavaBeans introspection to configure components. Options strings are no longer needed. われわれは、現在、コンポーネントを設定するためにJavaBeansのイントロスペクションをつかいます。 オプション文字列は、今後必要なくなります。 |
Priority |
getThreshold()
Returns this appenders threshold priority. |
boolean |
isAsSevereAsThreshold(Priority priority)
Check whether the message priority is below the appender's threshold. |
void |
setErrorHandler(ErrorHandler eh)
Set the ErrorHandler for this Appender.
|
void |
setLayout(Layout layout)
Set the layout for this appender. |
void |
setName(String name)
Set the name of this Appender. |
void |
setOption(String key,
String value)
Set option to value.
|
void |
setThreshold(Priority threshold)
Set the threshold priority. |
| クラス java.lang.Object から継承したメソッド |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| インタフェース org.apache.log4j.Appender から継承したメソッド |
close, requiresLayout |
| フィールドの詳細 |
public static final String THRESHOLD_OPTION
オプションは、現在JavaBeansのパラダイムで使うために処理されます。 この不変数は、もはや必要とされません。そして、近いうちに削除される予定です。
setThreshold method. Current value of this string constant is
Threshold.
アペンダーに境界値を設定するためのオプションを指定する際に使われる文字列定数です。
setThreshold(org.apache.log4j.Priority)メソッドを参照してください。この文字列定数の現在の値は、Thresholdです。
protected Layout layout
アペンダーの実装クラスが自分のレイアウトを保持している場合、レイアウト変数が、設定されている必要はありません。
protected String name
protected Priority threshold
デフォルトでは、閾値フィルタリングの優先順位はありません。
protected ErrorHandler errorHandler
errorHandlerが絶対にnullでないことが想定かつ強制されます。
protected Filter headFilter
null
initially.
フィルターチェインの最初のフィルタです。
初期値では、nullに設定されています。
protected Filter tailFilter
フィルタチェインの最終端のフィルタです。
protected boolean closed
アペンダーがクローズされたかどうか?
| コンストラクタの詳細 |
public AppenderSkeleton()
| メソッドの詳細 |
public void activateOptions()
派生したアペンダーは、オプション構造がこのメソッドを要求する場合、このメソッドをオーバーライドする必要がある。
OptionHandler 内の activateOptionspublic void addFilter(Filter newFilter)
フィルタのリストの終端に新規のフィルタを追加する。
Appender 内の addFilterprotected abstract void append(LoggingEvent event)
AppenderSkeleton should implement this
method to perform actual logging. See also AppenderSkeleton.doAppend method.
AppenderSkeletonのサブクラスは実際にロギングを行うためにこのメソッドを実装する必要があります。
AppenderSkeleton.doAppendメソッドを参照してください。
public void clearFilters()
フィルタチェインをクリアします。
Appender 内の clearFilterspublic void finalize()
close method.
実装クラスのcloseメソッドを呼ぶことでこのアペンダーをファイナライズします。
Object 内の finalizepublic ErrorHandler getErrorHandler()
ErrorHandler for this
Appender.
このアペンダに現在設定されているErrorHandlerを返します。
Appender 内の getErrorHandlerpublic Filter getFilter()
先頭のフィルタを返します。
Appender 内の getFilterpublic final Filter getFirstFilter()
null if no is
filter is set.
このアペンダに関するフィルタチェイン内にある最初のフィルタを返します。
もしフィルタが設定されていなければ、戻り値は、nullかもしれません。
public Layout getLayout()
このアペンダのレイアウトを返します。値はnull かもしれません。
Appender 内の getLayoutpublic final String getName()
このFileAppenderの名前を返します。
Appender 内の getNamepublic String[] getOptionStrings()
われわれは、現在、コンポーネントを設定するためにJavaBeansのイントロスペクションをつかいます。 オプション文字列は、今後必要なくなります。
THRESHOLD_OPTION}.
THRESHOLD_OPTIONの文字列配列を返します。
Configurable appenders must override this method to return the additional options they accept.
コンフィグ可能なアペンダは、それらが受け入れられる追加オプションを返すためにこのメソッドをオーバーライドする必要があります。
OptionHandler 内の getOptionStringspublic Priority getThreshold()
setThreshold(org.apache.log4j.Priority) method for the meaning of this option.
このアペンダの閾値の優先度を返します。
このオプションの使い方については、setThreshold(org.apache.log4j.Priority)メソッドを参照してください。
public boolean isAsSevereAsThreshold(Priority priority)
true.
メッセージの優先度がアペンダの閾値より下回っているかをチェックします。
もし閾値の設定がない場合、その時は、戻り値は、必ずtrueです。
public void doAppend(LoggingEvent event)
append(org.apache.log4j.spi.LoggingEvent) method.
このメソッドは、閾値のチェックを行い、append(org.apache.log4j.spi.LoggingEvent)メソッドで設定したサブクラスに対し、実際にロギング処理を委譲する前に、フィルタリングを行います。
Appender 内の doAppendpublic void setErrorHandler(ErrorHandler eh)
ErrorHandler for this Appender.
このアペンダに対し、ErrorHandlerを設定します。
Appender 内の setErrorHandlerpublic void setLayout(Layout layout)
SocketAppender ignores the layout set
here.
このアペンダにレイアウトを設定します。
アペンダのいくつかは、自分自身で(固定の)レイアウトを保持していますが、それを使うわけではありません。
例えば、SocketAppenderはここに設定するレイアウトを無視します。
Appender 内の setLayoutpublic void setName(String name)
このアペンダに名前を設定します。
Appender 内の setName
public void setOption(String key,
String value)
setOption method.
汎用的なsetOptionメソッドを使う代わりに、直接オプションに関しては、セッターメソッドを使います。
OptionHandler の記述: 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()が呼ばれる時にだけ有効になります。
OptionHandler 内の setOptionpublic void setThreshold(Priority threshold)
閾値の優先度を設定します。 閾値の優先度より低い優先度をもつ全てのログイベントは、アペンダに無視されます。
In configuration files this option is specified by setting the value of the Threshold option to a priority string, such as "DEBUG", "INFO" and so on.
設定ファイルでこのオプションは、閾値を"DEBUG"や"INFO"などなどの優先度文字列に置き換えることで設定されます。
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||