net.sf.taverna.raven.log
Class ConsoleLog
java.lang.Object
net.sf.taverna.raven.log.ConsoleLog
- All Implemented Interfaces:
- LogInterface
public class ConsoleLog
- extends java.lang.Object
- implements LogInterface
Implementation of LogInterface for simple System.err based printouts. To use
this implementation, do:
Log.setImplementation(new ConsoleLog());
This is a very simple implementation, that by default only logs messages at
WARN or higher. This threshold can be changed by setting the
level member. The destination output can be changed by setting
the console member. Stack traces will be printed by default if
provided, but this can be disabled by setting printStackTrace
to false
- Author:
- Stian Soiland-Reyes
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
level
public static LogInterface.Priority level
- Minimum level to log, ie. messages with lover priority will be discarded.
By default set to Priority.WARN.
console
public static java.io.PrintStream console
- Where to print log messages. By default set to System.err.
printStackTrace
public boolean printStackTrace
- Whether to print stacktraces if a Throwable was given with the log
message. By default set to true.
ConsoleLog
public ConsoleLog()
ConsoleLog
public ConsoleLog(java.lang.Class c)
getLogger
public LogInterface getLogger(java.lang.Class c)
- Specified by:
getLogger in interface LogInterface
log
public void log(LogInterface.Priority p,
java.lang.Object msg,
java.lang.Throwable ex)
- Description copied from interface:
LogInterface
- Log a message.
- Specified by:
log in interface LogInterface
- Parameters:
p - Prioritymsg - Messageex - Exception