|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.taverna.raven.log.Log
public class Log
Log proxy for Raven
Allow Raven to log its internals without worrying about which implementation of the logging framework to use. Logging framework can be switched on the fly by calling Log.setImplementation(LogInterface).
The public interface of this class slightly resembles that of Log4j.Logger. Example usage:
public class LocalRepository implements Repository {
private static Log logger = Log.getLogger(LocalRepository.class);
..
try {
ac = new LocalArtifactClassLoader(dep);
logger.info("Found " + ac);
} catch (MalformedURLException e) {
logger.error("Malformed URL when loading " + dep, e);
}
The default log implementation is JavaLog, which proxies to java.util.logging. For details on how to modify these settings, see JavaLog. Other available implementations are ConsoleLog, which just prints to System.err for everything on level WARN or above, or Log4jLog in the artifact raven-log4j, which depends on log4j being available through the system classloader. For details, see Log4jLog.
Logging,
JavaLog,
ConsoleLog,
Log4jLog,
Log.setImplementation(LogInterface)| Method Summary | |
|---|---|
void |
debug(java.lang.Object msg)
|
void |
debug(java.lang.Object msg,
java.lang.Throwable ex)
|
void |
error(java.lang.Object msg)
|
void |
error(java.lang.Object msg,
java.lang.Throwable ex)
|
void |
fatal(java.lang.Object msg)
|
void |
fatal(java.lang.Object msg,
java.lang.Throwable ex)
|
static Log |
getLogger(java.lang.Class c)
|
void |
info(java.lang.Object msg)
|
void |
info(java.lang.Object msg,
java.lang.Throwable ex)
|
void |
log(LogInterface.Priority priority,
java.lang.Object msg,
java.lang.Throwable ex)
|
static void |
setImplementation(LogInterface implementation)
Set the implementation |
void |
warn(java.lang.Object msg)
|
void |
warn(java.lang.Object msg,
java.lang.Throwable ex)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Log getLogger(java.lang.Class c)
public static void setImplementation(LogInterface implementation)
implementation - public void debug(java.lang.Object msg)
public void debug(java.lang.Object msg,
java.lang.Throwable ex)
public void error(java.lang.Object msg)
public void error(java.lang.Object msg,
java.lang.Throwable ex)
public void fatal(java.lang.Object msg)
public void fatal(java.lang.Object msg,
java.lang.Throwable ex)
public void info(java.lang.Object msg)
public void info(java.lang.Object msg,
java.lang.Throwable ex)
public void log(LogInterface.Priority priority,
java.lang.Object msg,
java.lang.Throwable ex)
public void warn(java.lang.Object msg)
public void warn(java.lang.Object msg,
java.lang.Throwable ex)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||