public class DefaultLogger extends Object implements LoggerInterface
Constructor and Description |
---|
DefaultLogger() |
Modifier and Type | Method and Description |
---|---|
void |
debug(String txt)
Writes a log at DEBUG level.
|
void |
error(String txt)
Writes a log at ERROR level.
|
void |
errorEx(String txt,
Throwable e)
Writes a log at ERROR level with detail on exception.
|
void |
fatal(String txt)
Writes a log at FATAL level.
|
void |
fatalEx(String txt,
Throwable e)
Writes a log at ERROR level with detail on exception.
|
void |
info(String txt)
Writes a log at INFO level.
|
protected void |
log(PrintStream out,
int level,
String txt,
Throwable e)
Method to output a log.
|
void |
warn(String txt)
Writes a log at WARN level.
|
void |
warnEx(String txt,
Throwable e)
Writes a log at WARN level with detail on exception.
|
protected void log(PrintStream out, int level, String txt, Throwable e)
out
- Output stream.level
- Log level.txt
- Text to log.e
- Exception.public void debug(String txt)
LoggerInterface
debug
in interface LoggerInterface
txt
- String to write.public void info(String txt)
LoggerInterface
info
in interface LoggerInterface
txt
- String to write.public void warn(String txt)
LoggerInterface
warn
in interface LoggerInterface
txt
- String to write.public void warnEx(String txt, Throwable e)
LoggerInterface
warnEx
in interface LoggerInterface
txt
- String to write.e
- Exception.public void error(String txt)
LoggerInterface
error
in interface LoggerInterface
txt
- String to write.public void errorEx(String txt, Throwable e)
LoggerInterface
errorEx
in interface LoggerInterface
txt
- String to write.e
- Exception.public void fatal(String txt)
LoggerInterface
fatal
in interface LoggerInterface
txt
- String to write.public void fatalEx(String txt, Throwable e)
LoggerInterface
fatalEx
in interface LoggerInterface
txt
- String to write.e
- Exception.