Package org.jmol.util
Class DefaultLogger
- java.lang.Object
-
- org.jmol.util.DefaultLogger
-
- All Implemented Interfaces:
LoggerInterface
public class DefaultLogger extends Object implements LoggerInterface
Default implementation of the logger.
-
-
Constructor Summary
Constructors Constructor Description DefaultLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
log
protected void log(PrintStream out, int level, String txt, Throwable e)
Method to output a log.- Parameters:
out
- Output stream.level
- Log level.txt
- Text to log.e
- Exception.
-
debug
public void debug(String txt)
Description copied from interface:LoggerInterface
Writes a log at DEBUG level.- Specified by:
debug
in interfaceLoggerInterface
- Parameters:
txt
- String to write.
-
info
public void info(String txt)
Description copied from interface:LoggerInterface
Writes a log at INFO level.- Specified by:
info
in interfaceLoggerInterface
- Parameters:
txt
- String to write.
-
warn
public void warn(String txt)
Description copied from interface:LoggerInterface
Writes a log at WARN level.- Specified by:
warn
in interfaceLoggerInterface
- Parameters:
txt
- String to write.
-
warnEx
public void warnEx(String txt, Throwable e)
Description copied from interface:LoggerInterface
Writes a log at WARN level with detail on exception.- Specified by:
warnEx
in interfaceLoggerInterface
- Parameters:
txt
- String to write.e
- Exception.
-
error
public void error(String txt)
Description copied from interface:LoggerInterface
Writes a log at ERROR level.- Specified by:
error
in interfaceLoggerInterface
- Parameters:
txt
- String to write.
-
errorEx
public void errorEx(String txt, Throwable e)
Description copied from interface:LoggerInterface
Writes a log at ERROR level with detail on exception.- Specified by:
errorEx
in interfaceLoggerInterface
- Parameters:
txt
- String to write.e
- Exception.
-
fatal
public void fatal(String txt)
Description copied from interface:LoggerInterface
Writes a log at FATAL level.- Specified by:
fatal
in interfaceLoggerInterface
- Parameters:
txt
- String to write.
-
fatalEx
public void fatalEx(String txt, Throwable e)
Description copied from interface:LoggerInterface
Writes a log at ERROR level with detail on exception.- Specified by:
fatalEx
in interfaceLoggerInterface
- Parameters:
txt
- String to write.e
- Exception.
-
-