|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
java.lang.Objectorg.apache.commons.logging.LogSource
LogFactory を代わりに使用してください。
- デフォルトのファクトリ実装はこのクラスが行うアルゴリズムと全く同じ振る舞いをします。
Factory for creating Log instances. Applications should call
the makeNewLogInstance() method to instantiate new instances
of the configured Log implementation class.
By default, calling getInstance() will use the following
algorithm:
org.apache.commons.logging.impl.Log4JLogger.org.apache.commons.logging.impl.Jdk14Logger.org.apache.commons.logging.impl.NoOpLog.You can change the default behavior in one of two ways:
org.apache.commons.logging.log to the name of the
org.apache.commons.logging.Log implementation class
you want to use.LogSource.setLogImplementation().
| フィールドの概要 | |
protected static boolean |
jdk14IsAvailable
推奨されていません。 Is JD 1.4 logging available |
protected static boolean |
log4jIsAvailable
推奨されていません。 Is log4j available (in the current classpath) |
protected static Constructor |
logImplctor
推奨されていません。 Constructor for current log class |
protected static Hashtable |
logs
推奨されていません。 |
| コンストラクタの概要 | |
private |
LogSource()
推奨されていません。 Don't allow others to create instances |
| メソッドの概要 | |
static Log |
getInstance(Class clazz)
推奨されていません。 Get a Log instance by class |
static Log |
getInstance(String name)
推奨されていません。 Get a Log instance by class name |
static String[] |
getLogNames()
推奨されていません。 Returns a String array containing the names of
all logs known to me. |
static Log |
makeNewLogInstance(String name)
推奨されていません。 Create a new Log implementation, based
on the given name.
|
static void |
setLogImplementation(Class logclass)
推奨されていません。 Set the log implementation/log implementation factory by class. |
static void |
setLogImplementation(String classname)
推奨されていません。 Set the log implementation/log implementation factory by the name of the class. |
| クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| フィールドの詳細 |
protected static Hashtable logs
protected static boolean log4jIsAvailable
protected static boolean jdk14IsAvailable
protected static Constructor logImplctor
| コンストラクタの詳細 |
private LogSource()
| メソッドの詳細 |
public static void setLogImplementation(String classname)
throws LinkageError,
ExceptionInInitializerError,
NoSuchMethodException,
SecurityException,
ClassNotFoundException
Log, and provide a constructor that
takes a single String argument (containing the name
of the log).
LinkageError
ExceptionInInitializerError
NoSuchMethodException
SecurityException
ClassNotFoundException
public static void setLogImplementation(Class logclass)
throws LinkageError,
ExceptionInInitializerError,
NoSuchMethodException,
SecurityException
Log,
and provide a constructor that takes a single String
argument (containing the name of the log).
LinkageError
ExceptionInInitializerError
NoSuchMethodException
SecurityExceptionpublic static Log getInstance(String name)
Log instance by class name
public static Log getInstance(Class clazz)
Log instance by class
public static Log makeNewLogInstance(String name)
Log implementation, based
on the given name.
The specific Log implementation returned
is determined by the value of the
org.apache.commons.logging.log property.
The value of org.apache.commons.logging.log may be set to
the fully specified name of a class that implements
the Log interface. This class must also
have a public constructor that takes a single
String argument (containing the name
of the Log to be constructed.
When org.apache.commons.logging.log is not set,
or when no corresponding class can be found,
this method will return a Log4JLogger
if the log4j Logger class is
available in the LogSource's classpath, or a
Jdk14Logger if we are on a JDK 1.4 or later system, or
NoOpLog if neither of the above conditions is true.
name - the log name (or category)public static String[] getLogNames()
String array containing the names of
all logs known to me.
|
||||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||