net.sf.taverna.raven.log
Class Log4jLog
java.lang.Object
net.sf.taverna.raven.log.Log4jLog
- All Implemented Interfaces:
- LogInterface
public class Log4jLog
- extends java.lang.Object
- implements LogInterface
Implementation of LogInterface for a log4j backend. To use this
implementation, do:
Log.setImplementation(new Log4jLog());
Note that this depends on log4j being available through the system default
classloader (ie. normally on the CLASSPATH), as we can't load log4j through
Raven and at the same time use log4j for logging Raven internals, as that
would force recursive logging calls when log4j needs to load any of it's
classes.
(However, Raven can download log4j, this trick is used by Taverna's
Bootstrap class by including log4j in the profile with system="true", and
specifying BootstrapClassLoader as the system classloader).
- Author:
- Stian Soiland-Reyes
- See Also:
Bootstrap
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Log4jLog
public Log4jLog()
Log4jLog
public Log4jLog(java.lang.Class c)
getLogger
public Log4jLog 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