public class StandardLogger extends Logger
Modifier and Type | Field and Description |
---|---|
protected boolean[] |
enabledLevelFlags
Table of levels that are to be enabled.
|
protected java.lang.String[] |
levelNames
Table translating level number to name and the largest entry in the
array that is valid.
|
protected boolean[] |
logFileLevelFlags
Table of levels that are to be written to the log file.
|
protected int |
numLevels |
protected boolean[] |
stderrLevelFlags
Table of levels that are to be written to stderr
Accessed directly by the channel.
|
ALERT, centralLogger, CRITICAL, DEBUG, EMERGENCY, ERROR, INFO, LOCAL, LOG_FILE, LOG_TO_FILE, LOG_TO_STDERR, MAX_STD_LEVEL, NOTICE, standardLevelNames, WARNING
Constructor and Description |
---|
StandardLogger()
Construct a new logger.
|
StandardLogger(boolean makeCentral) |
Modifier and Type | Method and Description |
---|---|
void |
configure(java.io.File logFile,
int[] fileLevels,
int[] strerrLevels)
Configure the logger.
|
void |
configure(java.io.File logFile,
java.lang.String[] fileLevels,
java.lang.String[] stderrLevels) |
LogChannel |
getChannel(java.lang.String facility)
Get the log channel object for a facility.
|
int |
getLevel(java.lang.String level)
Convert a symbolic level to an integer identifier,
creating it if it doesn't exist
|
java.lang.String |
getLogLevelName(int level)
Convert an int to a symbolic level name.
|
java.io.File |
switchLogFile(java.io.File logFile)
Switch a log file; replacing the old one with a new one.
|
getCentralLogger, getLevelName
protected java.lang.String[] levelNames
protected int numLevels
protected boolean[] enabledLevelFlags
protected boolean[] logFileLevelFlags
protected boolean[] stderrLevelFlags
public StandardLogger()
public StandardLogger(boolean makeCentral)
public java.io.File switchLogFile(java.io.File logFile) throws java.io.IOException
java.io.IOException
public void configure(java.io.File logFile, int[] fileLevels, int[] strerrLevels) throws java.io.IOException
java.io.IOException
public void configure(java.io.File logFile, java.lang.String[] fileLevels, java.lang.String[] stderrLevels) throws java.io.IOException
java.io.IOException
public LogChannel getChannel(java.lang.String facility)
getChannel
in class Logger
public int getLevel(java.lang.String level)
public java.lang.String getLogLevelName(int level)