org.curjent.example.agent.logger
Interface Logger
- All Known Implementing Classes:
- LoggerTask
public interface Logger
The is an example of a logging agent. It formats and prints messages to the
console in the background. Callers continue running after logging messages
instead of waiting for the relatively slow console I/O calls. Another
potential example is an agent that asynchronously displays messages in an
application's main window. Another possibility is to create an agent as a
Java logging Handler as described in the Package Description for the Java
logging facility.
The Logger interface for our example defines a singleton agent INSTANCE. The
logger supports message formatting via java.text.MessageFormat with a
variable number of message arguments.
INSTANCE
static final Logger INSTANCE
log
void log(Object object)
log
void log(String message,
Object... args)
log
void log(String message,
Throwable exception)
Copyright 2009-2011 Tom Landon
Apache License 2.0