org.apache.commons.logging
クラス LogSource

java.lang.Object
  拡張org.apache.commons.logging.LogSource

推奨されていません。 LogFactory を代わりに使用してください。 - デフォルトのファクトリ実装はこのクラスが行うアルゴリズムと全く同じ振る舞いをします。
Use {@link LogFactory} instead - The default factory implementation performs exactly the same algorithm as this class did

public class LogSource
extends Object

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:

You can change the default behavior in one of two ways:

バージョン:
$Id: LogSource.java,v 1.2 2004/04/04 15:15:18 tatakaha Exp $
作成者:
Rod Waldhoff
翻訳者:
日置 聡
翻訳状況:
見送り

フィールドの概要
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
 

フィールドの詳細

logs

protected static Hashtable logs
推奨されていません。 

log4jIsAvailable

protected static boolean log4jIsAvailable
推奨されていません。 
Is log4j available (in the current classpath)


jdk14IsAvailable

protected static boolean jdk14IsAvailable
推奨されていません。 
Is JD 1.4 logging available


logImplctor

protected static Constructor logImplctor
推奨されていません。 
Constructor for current log class

コンストラクタの詳細

LogSource

private LogSource()
推奨されていません。 
Don't allow others to create instances

メソッドの詳細

setLogImplementation

public static void setLogImplementation(String classname)
                                 throws LinkageError,
                                        ExceptionInInitializerError,
                                        NoSuchMethodException,
                                        SecurityException,
                                        ClassNotFoundException
推奨されていません。 
Set the log implementation/log implementation factory by the name of the class. The given class must implement Log, and provide a constructor that takes a single String argument (containing the name of the log).

例外:
LinkageError
ExceptionInInitializerError
NoSuchMethodException
SecurityException
ClassNotFoundException

setLogImplementation

public static void setLogImplementation(Class logclass)
                                 throws LinkageError,
                                        ExceptionInInitializerError,
                                        NoSuchMethodException,
                                        SecurityException
推奨されていません。 
Set the log implementation/log implementation factory by class. The given class must implement Log, and provide a constructor that takes a single String argument (containing the name of the log).

例外:
LinkageError
ExceptionInInitializerError
NoSuchMethodException
SecurityException

getInstance

public static Log getInstance(String name)
推奨されていません。 
Get a Log instance by class name


getInstance

public static Log getInstance(Class clazz)
推奨されていません。 
Get a Log instance by class


makeNewLogInstance

public static Log makeNewLogInstance(String name)
推奨されていません。 
Create a new 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)

getLogNames

public static String[] getLogNames()
推奨されていません。 
Returns a String array containing the names of all logs known to me.



このドキュメントは、Ja-Jakartaにより訳されました。 コメントがある場合は report@jajakarta.orgまでお願いします。
Translated into Japanese by jajakarta.org. The original page is here.
Copyright (c) 2002-2003 - Apache Software Foundation