org.apache.log4j
クラス Priority

java.lang.Object
  |
  +--org.apache.log4j.Priority
直系の既知のサブクラス:
XPriority

public class Priority
extends Object

Defines the minimum set of priorities recognized by the system, that is FATAL, ERROR, WARN, INFO and DEBUG.

システムで認識される最小の優先度のセットを定義します。 それには、FATALERRORWARNINFODEBUGがあります。

The Priority class may be subclassed to define a larger priority set.

Priorityクラスは、より大きい優先度セットを定義するためにサブクラス化されかもしれません。

作成者:
Ceki Gülcü

フィールドの概要
static Priority DEBUG
          The DEBUG priority designates fine-grained informational events that are most useful to debug an application.
static int DEBUG_INT
           
static Priority ERROR
          The ERROR priority designates error events that might still allow the application to continue running.
static int ERROR_INT
           
static Priority FATAL
          The FATAL priority designates very severe error events that will presumably lead the application to abort.
static int FATAL_INT
           
static Priority INFO
          The INFO priority designates informational messages that highlight the progress of the application at coarse-grained level.
static int INFO_INT
           
static Priority WARN
          The WARN priority designates potentially harmful situations.
static int WARN_INT
           
 
コンストラクタの概要
protected Priority(int level, String levelStr, int syslogEquivalent)
          Instantiate a priority object.
 
メソッドの概要
static Priority[] getAllPossiblePriorities()
          Return all possible priorities as an array of Priority objects in descending order.
 int getSyslogEquivalent()
          Return the syslog equivalent of this priority as an integer.
 boolean isGreaterOrEqual(Priority r)
          Returns true if this priority has a higher or equal priority than the priority passed as argument, false otherwise.
 int toInt()
          Returns the integer representation of this priority.
static Priority toPriority(int val)
          Convert an integer passed as argument to a priority.
static Priority toPriority(int val, Priority defaultPriority)
          Convert an integer passed as argument to a priority.
static Priority toPriority(String sArg)
          Convert the string passed as argument to a priority.
static Priority toPriority(String sArg, Priority defaultPriority)
          Convert the string passed as argument to a priority.
 String toString()
          Returns the string representation of this priority.
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

フィールドの詳細

FATAL_INT

public static final int FATAL_INT

ERROR_INT

public static final int ERROR_INT

WARN_INT

public static final int WARN_INT

INFO_INT

public static final int INFO_INT

DEBUG_INT

public static final int DEBUG_INT

FATAL

public static final Priority FATAL
The FATAL priority designates very severe error events that will presumably lead the application to abort.

FATAL優先度は、おそらくアプリケーションの停止を起こすようなまさにサーバのエラーイベントを指します。


ERROR

public static final Priority ERROR
The ERROR priority designates error events that might still allow the application to continue running.

ERROR優先度は、まだアプリケーションが起動しつづけられるようなエラーイベントを指します。


WARN

public static final Priority WARN
The WARN priority designates potentially harmful situations.

WARN優先度は、潜在的に、有害な状況を指します。


INFO

public static final Priority INFO
The INFO priority designates informational messages that highlight the progress of the application at coarse-grained level.

INFO優先度は、粗粒度レベルでアプリケーションの推移を強調する情報のメッセージを指します。


DEBUG

public static final Priority DEBUG
The DEBUG priority designates fine-grained informational events that are most useful to debug an application.

DEBUG優先度は、アプリケーションのデバッグでもっとも役立つ細粒度の情報イベントを指します。

コンストラクタの詳細

Priority

protected Priority(int level,
                   String levelStr,
                   int syslogEquivalent)
Instantiate a priority object.

priorityオブジェクトのインスタンスを生成します。

メソッドの詳細

getSyslogEquivalent

public final int getSyslogEquivalent()
Return the syslog equivalent of this priority as an integer.

整数としてこの優先度に相当するsyslogを返します。


toString

public final String toString()
Returns the string representation of this priority.

優先度の文字列表記を返します。

オーバーライド:
クラス Object 内の toString

toInt

public final int toInt()
Returns the integer representation of this priority.

優先度の整数表記を返します。


isGreaterOrEqual

public boolean isGreaterOrEqual(Priority r)
Returns true if this priority has a higher or equal priority than the priority passed as argument, false otherwise.

もし、この優先度がパラメタとして渡された優先度より大きいか等しい優先度の場合、trueを返します。 そうでない場合は、falseを返します。

You should think twice before overriding the default implementation of isGreaterOrEqual method.

あなたは、isGreaterOrEqualメソッドのデフォルト実装をオーバーライドする前によく考えた方が無難です。


getAllPossiblePriorities

public static Priority[] getAllPossiblePriorities()
Return all possible priorities as an array of Priority objects in descending order.

降順でPriorityオブジェクトの配列として可能な全優先度を返します。


toPriority

public static Priority toPriority(String sArg)
Convert the string passed as argument to a priority. If the conversion fails, then this method returns DEBUG.

引数として渡された文字列を優先度へ変換します。 もし、変換が失敗した場合、その時は、このメソッドは、DEBUGを返します。


toPriority

public static Priority toPriority(int val)
Convert an integer passed as argument to a priority. If the conversion fails, then this method returns DEBUG.

引数として渡された整数を優先度へ変換します。 もし、変換が失敗した場合、その時は、このメソッドは、DEBUGを返します。


toPriority

public static Priority toPriority(int val,
                                  Priority defaultPriority)
Convert an integer passed as argument to a priority. If the conversion fails, then this method returns the specified default.

引数として渡された整数を優先度へ変換します。 もし、変換が失敗した場合、その時は、このメソッドは、設定されているデフォルトを返します。


toPriority

public static Priority toPriority(String sArg,
                                  Priority defaultPriority)
Convert the string passed as argument to a priority. If the conversion fails, then this method returns the value of defaultPriority.

引数として渡された文字列を優先度へ変換します。 もし、変換が失敗した場合、その時は、このメソッドは、defaultPriorityの値を返します。。



Please notify me about new log4j releases.