class StdStreamLogger extends java.lang.Object implements FsmLogger
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name
The logger name.
|
Constructor and Description |
---|
StdStreamLogger(java.lang.String name)
Create the object.
|
Modifier and Type | Method and Description |
---|---|
void |
debug(java.lang.String message)
Log a debug message.
|
void |
debug(java.lang.String message,
java.lang.Throwable throwable)
Log a debug message.
|
void |
error(java.lang.String message)
Log an error message.
|
void |
error(java.lang.String message,
java.lang.Throwable throwable)
Log an error message.
|
void |
fatal(java.lang.String message)
Log a fatal message.
|
void |
fatal(java.lang.String message,
java.lang.Throwable throwable)
Log a fatal message.
|
java.lang.String |
getName()
Get name of the logger.
|
void |
info(java.lang.String message)
Log an info message.
|
void |
info(java.lang.String message,
java.lang.Throwable throwable)
Log an info message.
|
boolean |
isDebugEnabled()
Get status of debug messages logging in this logger.
|
boolean |
isInfoEnabled()
Get status of info messages logging in this logger.
|
boolean |
isTraceEnabled()
Get status of trace messages logging in this logger.
|
private void |
log(java.io.PrintStream stream,
java.lang.String severity,
java.lang.String message,
java.lang.Throwable throwable)
Log the message.
|
void |
trace(java.lang.String message)
Log a trace message.
|
void |
trace(java.lang.String message,
java.lang.Throwable throwable)
Log a trace message.
|
void |
warn(java.lang.String message)
Log a warning message.
|
void |
warn(java.lang.String message,
java.lang.Throwable throwable)
Log a warning message.
|
public StdStreamLogger(java.lang.String name)
name
- the logger namepublic java.lang.String getName()
FsmLogger
public void fatal(java.lang.String message)
FsmLogger
public void fatal(java.lang.String message, java.lang.Throwable throwable)
FsmLogger
public void error(java.lang.String message)
FsmLogger
public void error(java.lang.String message, java.lang.Throwable throwable)
FsmLogger
public void warn(java.lang.String message)
FsmLogger
public void warn(java.lang.String message, java.lang.Throwable throwable)
FsmLogger
public void info(java.lang.String message)
FsmLogger
public void info(java.lang.String message, java.lang.Throwable throwable)
FsmLogger
public void debug(java.lang.String message)
FsmLogger
public void debug(java.lang.String message, java.lang.Throwable throwable)
FsmLogger
public void trace(java.lang.String message)
FsmLogger
public void trace(java.lang.String message, java.lang.Throwable throwable)
FsmLogger
public boolean isInfoEnabled()
FsmLogger
isInfoEnabled
in interface FsmLogger
public boolean isDebugEnabled()
FsmLogger
isDebugEnabled
in interface FsmLogger
public boolean isTraceEnabled()
FsmLogger
isTraceEnabled
in interface FsmLogger
private void log(java.io.PrintStream stream, java.lang.String severity, java.lang.String message, java.lang.Throwable throwable)
stream
- the output streamseverity
- the severity of the messagemessage
- the messagethrowable
- the exception or nullCopyright 2013 Michal Turek, AnotherFSM.