|
iiitToolkit 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.iiit.util.LogUtil
This class includes some methods to initialize a Log4J Logger
Constructor Summary | |
LogUtil()
|
Method Summary | |
static void |
init()
Initializes the Logger to log all messages with an log-level of DEBUB or higher. |
static void |
init(Configuration config)
Uses a Configuration block to configure and initialize the Logger
These Attributes are read from the configuration:LogLevel - log all messages of this level or higher LogLayout - use this layout string, defaults to "%d [%t] %-5p %c{1} - * %m%n" LogFile - the full pathname of the log file to write MaxFileSize - the maximum file size of the log file, default: 1,000,000 Bytes MaxBackupFiles - the number of old log files to save, default: 5 |
static void |
init(Configuration config,
Level defaultLevel)
Uses a Configuration block to configure and initialize the Logger
These Attributes are read from the configuration:LogLevel - log all messages of this level or higher LogLayout - use this layout string, defaults to "%d [%t] %-5p %c{1} - * %m%n" LogFile - the full pathname of the log file to write MaxFileSize - the maximum file size of the log file, default: 1,000,000 Bytes MaxBackupFiles - the number of old log files to save, default: 5 |
static void |
init(Level level)
Initializes the Logger to log all messages with an log-level of level or higher. |
static void |
init(Level level,
String filename)
Initializes the Logger to log all messages with an log-level of level or higher. |
static void |
init(Level level,
String filename,
int maxFileSize,
int maxBackupFiles)
Initializes the Logger to log all messages with an log-level of level or higher. |
static void |
init(String level,
Level defaultLevel)
Initializes the Logger to log all messages with an log-level of level or higher. |
static void |
init(String level,
String filename)
Initializes the Logger to log all messages with an log-level of level or higher. |
static void |
init(String level,
String filename,
int maxFileSize,
int maxBackupFiles)
Initializes the Logger to log all messages with an log-level of level or higher. |
static boolean |
loggerIsInitialized()
Retrieve if the Logger is already initialized. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LogUtil()
Method Detail |
public static final boolean loggerIsInitialized()
public static final void init(Level level)
level
- log all messages of this level or higherpublic static final void init(String level, Level defaultLevel)
level
- log all messages with a log-level named level or higher.defaultLevel
- use this level as default if the level name can not be parsed.public static final void init(Level level, String filename, int maxFileSize, int maxBackupFiles)
level
- log all messages of this level or higherfilename
- the name of the file to send the log messages to. If it is null or empty
System.out
will be used.maxFileSize
- the maximum file size of the log filemaxBackupFiles
- the number of old log files to savepublic static final void init(String level, String filename, int maxFileSize, int maxBackupFiles)
level
- log all messages of this level or higherfilename
- the name of the file to send the log messages to. If it is null or empty
System.out
will be used.maxFileSize
- the maximum file size of the log filemaxBackupFiles
- the number of old log files to savepublic static final void init(Level level, String filename)
level
- log all messages of this level or higherfilename
- the name of the file to send the log messages to. If it is null or empty
System.out
will be used.public static final void init(String level, String filename)
level
- log all messages of this level or higherfilename
- the name of the file to send the log messages to. If it is null or empty
System.out
will be used.public static final void init(Configuration config, Level defaultLevel)
Configuration
block to configure and initialize the Logger
These Attributes are read from the configuration:"%d [%t] %-5p %c{1} - * %m%n"
config
- the configuration block to read.defaultLevel
- use this log level as defaultpublic static final void init(Configuration config)
Configuration
block to configure and initialize the Logger
These Attributes are read from the configuration:"%d [%t] %-5p %c{1} - * %m%n"
config
- the configuration block to read.public static final void init()
|
iiitToolkit 1.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |