org.apache.log4j
クラス BasicConfigurator

java.lang.Object
  |
  +--org.apache.log4j.BasicConfigurator
直系の既知のサブクラス:
DOMConfigurator, PropertyConfigurator

public class BasicConfigurator
extends Object

Use this class to quickly configure the package.

直ぐにパッケージを設定するには、このクラスを使います。

For file based configuration see PropertyConfigurator. For XML based configuration see DOMConfigurator.

ファイルをベースとした設定方法に関しては、PropertyConfiguratorを参照してください。 XMLをベースとした設定に関しては、DOMConfiguratorを参照してください。

導入されたバージョン:
0.8.1
作成者:
Ceki Gülcü

フィールドの概要
static String DISABLE_KEY
          DISABLE_KEY is the name of the constant holding the string value log4j.disable.
static String DISABLE_OVERRIDE_KEY
          DISABLE_OVERRIDE_KEY is the name of the constant holding the string value log4j.disableOverride.
static String INHERITED
          Special priority value signifying inherited behaviour.
 
コンストラクタの概要
protected BasicConfigurator()
           
 
メソッドの概要
protected  void addRenderer(Hierarchy hierarchy, String renderedClassName, String renderingClassName)
          Used by subclasses to add a renderer to the hierarchy passed as parameter.
static void configure()
          Add a FileAppender that uses PatternLayout using the PatternLayout.TTCC_CONVERSION_PATTERN and prints to System.out to the root category.
static void configure(Appender appender)
          Add appender to the root category.
static void disable(Priority p)
          推奨されていません。 Use Category.getDefaultHierarchy().disable(p) instead.

代替として、Category.getDefaultHierarchy().disable(p)を利用します。

static void disable(String priorityStr)
          推奨されていません。 Use Category.getDefaultHierarchy().disable() instead.

代替として、Category.getDefaultHierarchy().disable()を利用します。

static void disableAll()
          推奨されていません。 Use Category.getDefaultHierarchy().disableAll() instead.

代替として、Category.getDefaultHierarchy().disableAll()を利用します。

static void disableDebug()
          推奨されていません。 Use Category.getDefaultHierarchy().disableDebug() instead.

代替として、Category.getDefaultHierarchy().disableDebug()を利用します。

static void disableInfo()
          推奨されていません。 Use Category.getDefaultHierarchy().disableInfo() instead.

代替として、Category.getDefaultHierarchy().disableInfi()を利用します。

static void enableAll()
          推奨されていません。 Use Category.getDefaultHierarchy().enableAll() instead.

代替として、Category.getDefaultHierarchy().enableAll()を参照してください。

static void resetConfiguration()
          Reset the default hierarchy to its defaut.
static void resetConfiguration(Hierarchy hierarchy)
          推奨されていません。 Use hierarchy.resetConfiguration() instead.

代替として、hierarchy.resetConfiguration()を利用します。

 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

フィールドの詳細

DISABLE_OVERRIDE_KEY

public static final String DISABLE_OVERRIDE_KEY

DISABLE_OVERRIDE_KEY is the name of the constant holding the string value log4j.disableOverride.

DISABLE_OVERRIDE_KEYは、文字列変数log4j.disableOverrideを保持した定数の名前です。

Setting the system property log4j.disableOverride to "true" or any other value than "false" overrides the effects of all methods Hierarchy.disable(java.lang.String), Hierarchy.disableAll(), Hierarchy.disableDebug() and Hierarchy.disableInfo(). Thus, enabling normal evaluation of logging requests, i.e. according to the Basic Selection Rule.

システムプロパティ log4j.disableOverrideを"true"または"false"以外の値を設定することで、全てのメソッド、Hierarchy.disable(java.lang.String), Hierarchy.disableAll(), Hierarchy.disableDebug()Hierarchy.disableInfo()を上書きします。 それにより、ロギングリクエストを普通に評価できます。これについては、Basic Selectionルールに従います。

If both log4j.disableOverride and a log4j.disable options are present, then log4j.disableOverride as the name indicates overrides any log4j.disable options.

もし、log4j.disableOverridelog4j.disableオプションの両方が設定されている場合、その時は、名前が指し示す通り、log4j.disableOverridelog4j.disableオプションを上書きします。

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

DISABLE_KEY

public static final String DISABLE_KEY

DISABLE_KEY is the name of the constant holding the string value log4j.disable.

DISABLE_KEY は、文字列変数 log4j.disableを保持している定数の名前です。

Setting the system property log4j.disable to DEBUG, INFO, WARN, ERROR or FATAL is equivalent to calling the Hierarchy.disable(java.lang.String) method with the corresponding priority.

システムプロパティ log4j.disable を、DEBUG,INFO,WARN,ERROR またh FATAL に設定することで、その設定と同じ優先度を使うHierarchy.disable(java.lang.String)メソッドを呼ぶのと同様になります。

If both log4j.disableOverride and a log4j.disable options are present, then log4j.disableOverride as the name indicates overrides any log4j.disable options.

もし、log4j.disableOverridelog4j.disableオプションの両方が設定されている場合、その時は、名前が指し示す通り、log4j.disableOverridelog4j.disableオプションを上書きします。

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

INHERITED

public static final String INHERITED
Special priority value signifying inherited behaviour. The current value of this string constant is inherited.

振る舞いを引き継いだことを表す特別な優先度の値です。 現状の文字列定数の値は、inherited です。

コンストラクタの詳細

BasicConfigurator

protected BasicConfigurator()
メソッドの詳細

addRenderer

protected void addRenderer(Hierarchy hierarchy,
                           String renderedClassName,
                           String renderingClassName)
Used by subclasses to add a renderer to the hierarchy passed as parameter.

パラメータとして渡された階層にレンダラーを追加する、サブクラスによって利用されます。


disable

public static void disable(String priorityStr)
推奨されていません。 Use Category.getDefaultHierarchy().disable() instead.

代替として、Category.getDefaultHierarchy().disable()を利用します。

See Hierarchy.disable(String).

Hierarchy.disable(String)を参照してください。


disable

public static void disable(Priority p)
推奨されていません。 Use Category.getDefaultHierarchy().disable(p) instead.

代替として、Category.getDefaultHierarchy().disable(p)を利用します。

See Hierarchy.disable(Priority).

Hierarchy.disable(Priority)を参照してください。


disableAll

public static void disableAll()
推奨されていません。 Use Category.getDefaultHierarchy().disableAll() instead.

代替として、Category.getDefaultHierarchy().disableAll()を利用します。

See Hierarchy.disableAll().

Hierarchy.disableAll()を参照してください。


disableDebug

public static void disableDebug()
推奨されていません。 Use Category.getDefaultHierarchy().disableDebug() instead.

代替として、Category.getDefaultHierarchy().disableDebug()を利用します。

See Hierarchy.disableDebug().

Hierarchy.disableDebug()を参照してください。


disableInfo

public static void disableInfo()
推奨されていません。 Use Category.getDefaultHierarchy().disableInfo() instead.

代替として、Category.getDefaultHierarchy().disableInfi()を利用します。

See Hierarchy.disableInfo().

Hierarchy.disableInfo()を参照してください。


enableAll

public static void enableAll()
推奨されていません。 Use Category.getDefaultHierarchy().enableAll() instead.

代替として、Category.getDefaultHierarchy().enableAll()を参照してください。

See Hierarchy.enableAll().

Hierarchy.enableAll()を参照してください。


configure

public static void configure()
Add a FileAppender that uses PatternLayout using the PatternLayout.TTCC_CONVERSION_PATTERN and prints to System.out to the root category.

PatternLayout.TTCC_CONVERSION_PATTERNを利用しているPatternLayoutを使う FileAppender を追加し、ルートのカテゴリとして、System.outに出力します。


configure

public static void configure(Appender appender)
Add appender to the root category.

ルートのカテゴリに対し、appenderを追加します。

パラメータ:
appender - The appender to add to the root category.

appender - ルートのカテゴリに追加するアペンダ


resetConfiguration

public static void resetConfiguration()
Reset the default hierarchy to its defaut. It is equivalent to calling Category.getDefaultHierarchy().resetConfiguration().

デフォルトの階層をデフォルトに戻します。 Category.getDefaultHierarchy().resetConfiguration()の呼び出しと同等です。

See Hierarchy.resetConfiguration() for more details.

さらなる詳細に関しては、Hierarchy.resetConfiguration()を参照してください。


resetConfiguration

public static void resetConfiguration(Hierarchy hierarchy)
推奨されていません。 Use hierarchy.resetConfiguration() instead.

代替として、hierarchy.resetConfiguration()を利用します。



Please notify me about new log4j releases.