org.mortbay.log

Class NullLogSink

Implemented Interfaces:
LifeCycle, LogSink, Serializable

public class NullLogSink
extends java.lang.Object
implements LogSink

Method Summary

String
getOptions()
boolean
isStarted()
void
log(String formattedLog)
Log a message.
void
log(String tag, Object msg, Frame frame, long time)
Log a message.
void
setLogImpl(LogImpl impl)
void
setOptions(String options)
void
start()
Start the LifeCycle.
void
stop()
Stop the LifeCycle.

Method Details

getOptions

public String getOptions()

isStarted

public boolean isStarted()
Specified by:
isStarted in interface LifeCycle
Returns:
True if the LifeCycle has been started.

log

public void log(String formattedLog)
Log a message. The formatted log string is written to the log sink. The default implementation writes the message to a PrintWriter.
Specified by:
log in interface LogSink
Parameters:
formattedLog -

log

public void log(String tag,
                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.
Specified by:
log in interface LogSink
Parameters:
tag - Tag for type of log
msg - The message
frame - The frame that generated the message.
time - The time stamp of the message.

setLogImpl

public void setLogImpl(LogImpl impl)
Specified by:
setLogImpl in interface LogSink

setOptions

public void setOptions(String options)

start

public void start()
Start the LifeCycle.
Specified by:
start in interface LifeCycle

stop

public void stop()
Stop the LifeCycle. The LifeCycle may wait for current activities to complete normally, but it can be interrupted.
Specified by:
stop in interface LifeCycle

Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.