org.curjent.example.agent.logger
Class LoggerTask
java.lang.Object
org.curjent.example.agent.logger.LoggerTask
- All Implemented Interfaces:
- Logger
class LoggerTask
- extends Object
- implements Logger
Logger task. The LoggerTask overrides the default unhandled exception
handler. The default handler defined in the Factories calls the Logger agent.
We configure the Logger agent to print the stack trace of unhandled
exceptions directly to the console to avoid an infinite loop. The
NullPointerExceptions thrown by the task's log methods are handled in this
way.
Fields inherited from interface org.curjent.example.agent.logger.Logger |
INSTANCE |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggerTask
LoggerTask()
newAgent
static Logger newAgent()
log
public void log(Object object)
- Specified by:
log
in interface Logger
log
public void log(String message,
Object... args)
- Specified by:
log
in interface Logger
log
public void log(String message,
Throwable exception)
- Specified by:
log
in interface Logger
Copyright 2009-2011 Tom Landon
Apache License 2.0