Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tomcat.util.qlog
Class QueueLogger

    java.lang.Object
      org.apache.tomcat.util.log.LogHandler
          org.apache.tomcat.util.qlog.Logger
              org.apache.tomcat.util.qlog.QueueLogger

public class QueueLogger
extends Logger

A real implementation of the Logger abstraction. It uses a log queue, so that the caller will not have to wait.

Since:
  Tomcat 3.1
Author:
  Anil V (akv@eng.sun.com)

Field Summary

Fields inherited from class org.apache.tomcat.util.qlog.Logger
`custom, day, defaultSink, MAX_THROWABLE_DEPTH, path, timestamp, timestampFormat, timestampFormatter, timestampRaw`

Fields inherited from class org.apache.tomcat.util.log.LogHandler
`level, sink`

Constructor Summary
`QueueLogger()`

Method Summary
`void` | `flush()` Flush the queue - in a separate thread, so that caller doesn't have to wait
`void` | `log(java.lang.String prefix, java.lang.String message, java.lang.Throwable t, int verbosityLevel)` Adds a log message and stack trace to the queue and returns immediately.
`void` | `setLogDaemon(LogDaemon ld)`

Methods inherited from class org.apache.tomcat.util.qlog.Logger
`formatTimestamp, formatTimestamp, getDatePrefix, getDay, getLevel, getPath, getTimestampFormat, getVerbosityLevel, isTimestamp, open, setDefaultSink, setPath, setTimestamp, setTimestampFormat, setVerbosityLevel, setVerbosityLevel, throwableToString, throwableToString`

Methods inherited from class org.apache.tomcat.util.log.LogHandler
`close, setLevel`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### QueueLogger

    public QueueLogger()

Method Detail

### setLogDaemon

    public void setLogDaemon(LogDaemon ld)

### log

    public void log(java.lang.String prefix,
                    java.lang.String message,
                    java.lang.Throwable t,
                    int verbosityLevel)

  Adds a log message and stack trace to the queue and returns immediately. The logger daemon thread will pick it up later and actually print it out.

  Overrides:
    `log` in class `LogHandler`
  Parameters:
    `message` - the message to log.
    `t` - the exception that was thrown.
    `verbosityLevel` - what type of message is this? (WARNING/DEBUG/INFO etc)
    `prefix` - optional prefix.

### flush

    public void flush()

  Flush the queue - in a separate thread, so that caller doesn't have to wait

  Overrides:
    `flush` in class `LogHandler`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001 Apache Software Foundation. All Rights Reserved.