DefaultLogger (Jasper Internal API Documentation)
Keywords: org.apache.jasper.logging.DefaultLogger class

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

## org.apache.jasper.logging
Class DefaultLogger

    java.lang.Object
      org.apache.jasper.logging.Logger
          org.apache.jasper.logging.DefaultLogger

public class DefaultLogger
extends Logger

Trivial logger that sends all messages to the default sink. To change default sink, call Logger.setDefaultSink(Writer)

Since:
  Tomcat 3.1
Author:
  Alex Chaffee (alex@jguru.com)

Nested Class Summary

Nested classes inherited from class org.apache.jasper.logging.Logger
`Logger.Helper`

Field Summary
`protected javax.servlet.ServletContext` | `servletContext` The servlet context we are associated with.

Fields inherited from class org.apache.jasper.logging.Logger
`custom, DEBUG, defaultLogger, defaultSink, ERROR, FATAL, INFORMATION, loggers, name, sink, timestamp, timestampFormat, timestampFormatter, timestampRaw, WARNING`

Constructor Summary
`DefaultLogger()` Default constructor leaves the debug output going to the default sink.
`DefaultLogger(javax.servlet.ServletContext servletContext)` Construct a logger that writes output to the servlet context log for the current web application.

Method Summary
`void` | `flush()` Flush the log.
`protected void` | `realLog(java.lang.String message)` Prints log message to default sink
`protected void` | `realLog(java.lang.String message, java.lang.Throwable t)` Prints log message to default sink

Methods inherited from class org.apache.jasper.logging.Logger
`canIgnore, close, formatTimestamp, formatTimestamp, getDefaultLogger, getLogger, getLoggerNames, getName, getPath, getTimestampFormat, getVerbosityLevel, isOpen, isTimestamp, log, log, log, log, matchVerbosityLevel, open, putLogger, removeLogger, setCustomOutput, setDefaultSink, setName, setPath, setTimestamp, setTimestampFormat, setVerbosityLevel, setVerbosityLevel, throwableToString, throwableToString, toString`

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

Field Detail

### servletContext

    protected javax.servlet.ServletContext servletContext

  The servlet context we are associated with.

Constructor Detail

### DefaultLogger

    public DefaultLogger()

  Default constructor leaves the debug output going to the default sink.

### DefaultLogger

    public DefaultLogger(javax.servlet.ServletContext servletContext)

  Construct a logger that writes output to the servlet context log for the current web application.

Parameters:
  `servletContext` - The servlet context for our web application

Method Detail

### realLog

    protected void realLog(java.lang.String message)

  Prints log message to default sink

  Specified by:
    `realLog` in class `Logger`
  Parameters:
    `message` - the message to log.

### realLog

    protected void realLog(java.lang.String message,
                           java.lang.Throwable t)

  Prints log message to default sink

  Specified by:
    `realLog` in class `Logger`
  Parameters:
    `message` - the message to log.
    `t` - the exception that was thrown.

### flush

    public void flush()

  Flush the log.

  Specified by:
    `flush` in class `Logger`

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

Copyright © 2000 Apache Software Foundation. All Rights Reserved.