Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.mortbay.util
Class LoggerLogSink  view LoggerLogSink download LoggerLogSink.java

java.lang.Object
  extended byorg.mortbay.util.LoggerLogSink
All Implemented Interfaces:
LifeCycle, LogSink, java.io.Serializable

public class LoggerLogSink
extends java.lang.Object
implements LogSink

JDK 1.4 Logger LogSink This implementation of LogSink can be used to direct messages to the JDK 1.4 log mechanism.

Version:
$Id: LoggerLogSink.java,v 1.1 2003/05/02 12:53:48 gregwilkins Exp $

Field Summary
private static StringMap __tagMap
           
private  java.util.logging.Logger _logger
           
private  java.lang.String _name
           
private  boolean _ownLogger
           
private  boolean _started
           
 
Constructor Summary
LoggerLogSink()
          Constructor.
LoggerLogSink(java.lang.String name)
          Constructor.
 
Method Summary
 java.util.logging.Logger getLogger()
           
 java.lang.String getName()
           
 java.lang.String getOptions()
           
 boolean isStarted()
           
 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 setLogger(java.util.logging.Logger logger)
           
 void setName(java.lang.String name)
           
 void setOptions(java.lang.String options)
          Set the log options.
 void start()
          Start the LifeCycle.
 void stop()
          Stop the LifeCycle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

__tagMap

private static StringMap __tagMap

_name

private java.lang.String _name

_logger

private java.util.logging.Logger _logger

_ownLogger

private boolean _ownLogger

_started

private boolean _started
Constructor Detail

LoggerLogSink

public LoggerLogSink()
Constructor.


LoggerLogSink

public LoggerLogSink(java.lang.String name)
Constructor.

Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getLogger

public java.util.logging.Logger getLogger()

setLogger

public void setLogger(java.util.logging.Logger logger)

start

public void start()
           throws java.lang.Exception
Description copied from interface: LifeCycle
Start the LifeCycle.

Specified by:
start in interface LifeCycle

stop

public void stop()
          throws java.lang.InterruptedException
Description copied from interface: LifeCycle
Stop the LifeCycle. The LifeCycle may wait for current activities to complete normally, but it can be interrupted.

Specified by:
stop in interface LifeCycle

isStarted

public boolean isStarted()
Specified by:
isStarted in interface LifeCycle

setOptions

public void setOptions(java.lang.String options)
Description copied from interface: LogSink
Set the log options.

Specified by:
setOptions in interface LogSink

getOptions

public java.lang.String getOptions()
Specified by:
getOptions in interface LogSink

log

public void log(java.lang.String tag,
                java.lang.Object msg,
                Frame frame,
                long time)
Description copied from interface: LogSink
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

log

public void log(java.lang.String formattedLog)
Description copied from interface: LogSink
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