org.apache.java.io
Interface Logger

All Known Implementing Classes:
JServLog, LogWriter

public abstract interface Logger

This interface represents a simple logger (LogWriter is an implementation).

Version:
$Revision: 1.1 $ $Date: 1999/09/20 22:07:41 $
See Also:
LogWriter

Method Summary
 void flush()
          Flush the log.
 boolean isActive()
          Tells if it is active.
 boolean isActive(java.lang.String channel)
          Tells if the given channel is active.
 void log(java.lang.String channel, java.lang.String message)
          Prints the log message on the right channel.
 void log(java.lang.String channel, java.lang.Throwable t)
          Prints the error message and stack trace if channel enabled.
 

Method Detail

isActive

public boolean isActive()
Tells if it is active.

isActive

public boolean isActive(java.lang.String channel)
Tells if the given channel is active.
Parameters:
channel - the channel to test.

log

public void log(java.lang.String channel,
                java.lang.String message)
Prints the log message on the right channel.

A "channel" is a virtual log that may be enabled or disabled by setting the property "identifier".channel.???=true where ??? is the channel identifier that must be passed with the message. If a channel is not recognized or its property is set to false the message is not written.

Parameters:
channel - the channel to put the message on.
name - the message to log.

log

public void log(java.lang.String channel,
                java.lang.Throwable t)
Prints the error message and stack trace if channel enabled.
Parameters:
t - the error thrown.

flush

public void flush()
Flush the log. Write any pending messages into the log media.