|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Object
|
+--org.apache.log4j.spi.Filter
|
+--org.apache.log4j.varia.PriorityMatchFilter
This is a very simple filter based on priority matching.
これは、優先度のマッチングをベースにしたとても単純なフィルタです。
The filter admits two options PriorityToMatch and
AcceptOnMatch. If there is an exact match between the value
of the PriorityToMatch option and the priority of the LoggingEvent, then the decide(org.apache.log4j.spi.LoggingEvent) method returns Filter.ACCEPT in case the AcceptOnMatch option value is set
to true, if it is false then Filter.DENY is returned. If there is no match, Filter.NEUTRAL is returned.
フィルタは、2つのオプション PriorityToMatch と AcceptOnMatch を許容します。
もし、OriorityToMatch オプションの値と LoggingEvent の優先度が完全にマッチする場合は、AcceptOnMatch オプションの値が true に設定されている時に限り、decide(org.apache.log4j.spi.LoggingEvent) メソッドが Filter.ACCEPT を返します。
もし、false が設定されている場合は、Filter.DENY が返されます。
もし、マッチしなければ、Filter.NEUTRAL が返されます。
See configuration files test11.xml and test12.xml for an example of
seeting up a PriorityMatchFilter.
PriorityMatchFilter のセットアップの例に関しては、設定ファイル test11.xml と test12.xml を参照してください。
| フィールドの概要 | |
static String |
ACCEPT_ON_MATCH_OPTION
推奨されていません。 Options are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term. 今日、オプションは、JavaBeans パラダイムを使用して処理されます。 この定数は、もはや必要ありません。そして、近いうちに削除されるでしょう。 |
static String |
PRIORITY_TO_MATCH_OPTION
推奨されていません。 Options are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term. 今日、オプションは、JavaBeans パラダイムを使用して処理されます。 この定数は、もはや必要ありません。そして、近いうちに削除されるでしょう。 |
| クラス org.apache.log4j.spi.Filter から継承したフィールド |
ACCEPT, DENY, NEUTRAL, next |
| コンストラクタの概要 | |
PriorityMatchFilter()
|
|
| メソッドの概要 | |
int |
decide(LoggingEvent event)
Return the decision of this filter. |
boolean |
getAcceptOnMatch()
|
String[] |
getOptionStrings()
Return list of strings that the OptionHandler instance recognizes. |
String |
getPriorityToMatch()
|
void |
setAcceptOnMatch(boolean acceptOnMatch)
|
void |
setOption(String key,
String value)
Set option to value.
|
void |
setPriorityToMatch(String priority)
|
| クラス org.apache.log4j.spi.Filter から継承したメソッド |
activateOptions |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
public static final String PRIORITY_TO_MATCH_OPTION
今日、オプションは、JavaBeans パラダイムを使用して処理されます。 この定数は、もはや必要ありません。そして、近いうちに削除されるでしょう。
public static final String ACCEPT_ON_MATCH_OPTION
今日、オプションは、JavaBeans パラダイムを使用して処理されます。 この定数は、もはや必要ありません。そして、近いうちに削除されるでしょう。
| コンストラクタの詳細 |
public PriorityMatchFilter()
| メソッドの詳細 |
public String[] getOptionStrings()
今日、私たちは、コンポーネントの設定には、JavaBeans のイントロスペクションを使用します
OptionHandler の記述: OptionHandlerインスタンスが認識する文字列のリストを返します。
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()が呼ばれる時にだけ有効になります。
public void setPriorityToMatch(String priority)
public String getPriorityToMatch()
public void setAcceptOnMatch(boolean acceptOnMatch)
public boolean getAcceptOnMatch()
public int decide(LoggingEvent event)
このフィルターの判定を返します。
Returns Filter.NEUTRAL if the PriorityToMatch
option is not set. Otherwise, the returned decision is defined
according to the following table:
もし、PriorityToMatch オプションが設定されていない場合、Filter.NEUTRAL を返します。
もしそうでない場合は、返される判定は、次の表に従って定義されます:
| Did a priority match occur? | AcceptOnMatch setting | |
|---|---|---|
| TRUE | FALSE | |
| TRUE | Filter.ACCEPT | Filter.DENY |
| FALSE | Filter.DENY | Filter.ACCEPT |
| 優先度がマッチしましたか? | AcceptOnMatch 設定 | |
|---|---|---|
| TRUE | FALSE | |
| TRUE | Filter.ACCEPT | Filter.DENY |
| FALSE | Filter.DENY | Filter.ACCEPT |
Filter 内の decideorg.apache.log4j.spi.Filter からコピーされたタグ:event - The LoggingEvent to decide upon.
event 決定するロギングイベント
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 内部クラス | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||