net.sf.taverna.raven.log
Class JavaLog

java.lang.Object
  extended by net.sf.taverna.raven.log.JavaLog
All Implemented Interfaces:
LogInterface

public class JavaLog
extends java.lang.Object
implements LogInterface

Implementation of LogInterface for a java.util.logging backend. To use this implementation, do:

 Log.setImplementation(new JavaLog());
 

To modify java.util.logging settings and get debug messages from Raven, you can specify a system property -Djava.util.logging.config.file=blah/bluh/logging.conf and in logging.conf specify something like:

 handlers=java.util.logging.ConsoleHandler
 #.level= FINEST
 net.sf.taverna.level=FINEST
 java.util.logging.ConsoleHandler.level = FINEST
 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
 

The default log level from Java is INFO, which for Raven means anything logged by Log.warn(), Log.error() or Log.fatal(). The mappings between LogInterface.Priority and levels of java.util.logging are:

 DEBUG --> FINER
 INFO --> FINE
 WARN --> WARNING
 ERROR --> SEVERE
 FATAL --> SEVERE
 

Author:
Stian Soiland-Reyes

Nested Class Summary
 
Nested classes/interfaces inherited from interface net.sf.taverna.raven.log.LogInterface
LogInterface.Priority
 
Constructor Summary
JavaLog()
           
JavaLog(java.lang.Class c)
           
 
Method Summary
 JavaLog getLogger(java.lang.Class c)
           
 void log(LogInterface.Priority p, java.lang.Object msg, java.lang.Throwable ex)
          Log a message.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaLog

public JavaLog()

JavaLog

public JavaLog(java.lang.Class c)
Method Detail

getLogger

public JavaLog 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 - Priority
msg - Message
ex - Exception