public class StandardErrorLogger extends java.lang.Object implements Logger
Modifier and Type | Field and Description |
---|---|
protected static java.lang.String[] |
errorLevelStrings
Error level strings for display.
|
protected java.lang.Object |
lock
Lock for synchronizing output.
|
protected boolean |
loggerEnabled
True if logger enabled.
|
protected java.io.PrintStream |
printStream
PrintStream for output.
|
Constructor and Description |
---|
StandardErrorLogger()
Create a standard error logger.
|
Modifier and Type | Method and Description |
---|---|
protected static java.lang.String |
getErrorLevelString(int level)
Get string representation of error level.
|
boolean |
isDebuggingEnabled()
Returns true if debugging messages are enabled.
|
boolean |
isLoggerEnabled()
Returns true if logger is enabled.
|
void |
log(int level,
java.lang.String str)
Logs a message.
|
void |
log(int level,
java.lang.String str,
java.lang.Throwable t)
Logs a message with a stack trace.
|
void |
logDebug(java.lang.String str)
Logs a message at the DEBUG level.
|
void |
logError(java.lang.String str)
Logs a message at the ERROR level.
|
void |
logError(java.lang.String str,
java.lang.Throwable t)
Logs a error message with a stack trace.
|
void |
logFatal(java.lang.String str)
Logs a message at the FATAL level.
|
void |
logFatal(java.lang.String str,
java.lang.Throwable t)
Logs a fatal message with a stack trace.
|
void |
logInfo(java.lang.String str)
Logs a message at the INFO level.
|
void |
logWarning(java.lang.String str)
Logs a message at the WARN level.
|
void |
terminate()
Terminates the logger.
|
protected java.io.PrintStream printStream
protected boolean loggerEnabled
protected static final java.lang.String[] errorLevelStrings
protected java.lang.Object lock
public void terminate()
public void logDebug(java.lang.String str)
public void logInfo(java.lang.String str)
public void logWarning(java.lang.String str)
logWarning
in interface Logger
str
- Log message.public void logError(java.lang.String str)
public void logError(java.lang.String str, java.lang.Throwable t)
public void logFatal(java.lang.String str)
public void logFatal(java.lang.String str, java.lang.Throwable t)
protected static java.lang.String getErrorLevelString(int level)
level
- The error level.public void log(int level, java.lang.String str)
public void log(int level, java.lang.String str, java.lang.Throwable t)
public boolean isDebuggingEnabled()
isDebuggingEnabled
in interface Logger
public boolean isLoggerEnabled()
isLoggerEnabled
in interface Logger