|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.directj.jlogger.JLoggerFactory
This class can create a JLogger, and return it. If the specified JLogger already exist, then it is returned. Moreover, there is a configuration methods, that allow you to easely create logger and log manager, and setting log level, without recompile your source code. Since 0.2.4, it also contains the list of already instancied formatter and output. This is to prevent from multiple output to access to the same resource (file or networking port).
Field Summary | |
private static Configurator |
configurator
The configurator tool. |
private static java.util.HashSet |
formatters
The set of formatter. |
private static java.util.Hashtable |
loggers
The list of logger. |
private static java.util.HashSet |
outputs
The set of output. |
static java.lang.String |
VERSION
The JLogger current version, as a String. |
Constructor Summary | |
private |
JLoggerFactory()
The default constructor. |
Method Summary | |
static void |
configure(java.lang.String _fileName)
Allows you to specify you're configuration file to load. |
static Configurator |
getConfigurator()
Returns the current configurator tool. |
static JLogger |
getLogger(java.lang.String _name)
Returns a new Logger, with a specified name. |
java.lang.String |
getVersion()
Returns the version of JLogger. |
private static void |
init()
Initializes the JLoggerFactory. |
static void |
setConfigurator(Configurator _configurator)
Changes the configuration tool to use. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static java.util.Hashtable loggers
private static java.util.HashSet outputs
private static java.util.HashSet formatters
private static Configurator configurator
public static final java.lang.String VERSION
Constructor Detail |
private JLoggerFactory()
Method Detail |
public static final JLogger getLogger(java.lang.String _name)
_name
- The logger name.
Logger
- The new logger.JLogger
private static final void init()
setConfigurator(Configurator)
,
configure(String)
public static final void setConfigurator(Configurator _configurator)
_configurator
- The configurator to use.public static final Configurator getConfigurator()
Configurator
- The Configurator.public static final void configure(java.lang.String _fileName)
_fileName
- The configuration file.setConfigurator(Configurator)
,
Configurator
public java.lang.String getVersion()
String
- The current JLogger version.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |