org.mortbay.util
Interface LogSink

All Superinterfaces:
LifeCycle, java.io.Serializable
All Known Implementing Classes:
Log4jSink, LoggerLogSink, NullLogSink, OutputStreamLogSink

public interface LogSink
extends LifeCycle, java.io.Serializable

A Log sink. This class represents both a concrete or abstract sink of Log data. The default implementation logs to a PrintWriter, but derived implementations may log to files, syslog, or other logging APIs.

Version:
$Id: LogSink.java,v 1.3 2003/04/24 21:57:52 bretts Exp $
Author:
Greg Wilkins (gregw)

Method Summary
 java.lang.String getOptions()
           
 void log(java.lang.String formattedLog)
          Log a message.
 void log(java.lang.String tag, java.lang.Object msg, Frame frame, long time)
          Log a message.
 void setOptions(java.lang.String options)
          Set the log options.
 
Methods inherited from interface org.mortbay.util.LifeCycle
isStarted, start, stop
 

Method Detail

setOptions

public void setOptions(java.lang.String options)
Set the log options.

Parameters:
options - A string of characters as defined for the LOG_OPTIONS system parameter.

getOptions

public java.lang.String getOptions()

log

public void log(java.lang.String tag,
                java.lang.Object msg,
                Frame frame,
                long time)
Log a message. This method formats the log information as a string and calls log(String). It should only be specialized by a derived implementation if the format of the logged messages is to be changed.

Parameters:
tag - Tag for type of log
msg - The message
frame - The frame that generated the message.
time - The time stamp of the message.

log

public void log(java.lang.String formattedLog)
Log a message. The formatted log string is written to the log sink. The default implementation writes the message to a PrintWriter.

Parameters:
formattedLog -


Copyright ? 2000 Mortbay Consulting Pty. Ltd. All Rights Reserved.