org.jmol.util
Class DefaultLogger

java.lang.Object
  extended by org.jmol.util.DefaultLogger
All Implemented Interfaces:
LoggerInterface

public class DefaultLogger
extends Object
implements LoggerInterface

Default implementation of the logger.


Constructor Summary
DefaultLogger()
           
 
Method Summary
 void debug(String txt)
          Writes a log at DEBUG level.
 void error(String txt)
          Writes a log at ERROR level.
 void error(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 fatal(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 warn(String txt, Throwable e)
          Writes a log at WARN level with detail on exception.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLogger

public DefaultLogger()
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 interface LoggerInterface
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 interface LoggerInterface
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 interface LoggerInterface
Parameters:
txt - String to write.

warn

public void warn(String txt,
                 Throwable e)
Description copied from interface: LoggerInterface
Writes a log at WARN level with detail on exception.

Specified by:
warn in interface LoggerInterface
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 interface LoggerInterface
Parameters:
txt - String to write.

error

public void error(String txt,
                  Throwable e)
Description copied from interface: LoggerInterface
Writes a log at ERROR level with detail on exception.

Specified by:
error in interface LoggerInterface
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 interface LoggerInterface
Parameters:
txt - String to write.

fatal

public void fatal(String txt,
                  Throwable e)
Description copied from interface: LoggerInterface
Writes a log at ERROR level with detail on exception.

Specified by:
fatal in interface LoggerInterface
Parameters:
txt - String to write.
e - Exception.