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

## org.apache.juli
Class FileHandler

    java.lang.Object
      java.util.logging.Handler
          org.apache.juli.FileHandler

    public class FileHandler

extends java.util.logging.Handler

Implementation of Handler that appends log messages to a file named {prefix}.{date}.{suffix} in a configured directory, with an optional preceding timestamp.

Version:
  $Id: FileHandler.java 939520 2010-04-30 00:14:14Z kkolinko $

Field Summary
`protected java.util.concurrent.locks.ReadWriteLock` | `writerLock` Lock used to control access to the writer.

Constructor Summary
`FileHandler()`
`FileHandler(java.lang.String directory, java.lang.String prefix, java.lang.String suffix)`

Method Summary
`void` | `close()` Close the currently open log file (if any).
`protected void` | `closeWriter()`
`void` | `flush()` Flush the writer.
`protected void` | `open()` Open the new log file for the date specified by `date`.
`protected void` | `openWriter()`
`void` | `publish(java.util.logging.LogRecord record)` Format and publish a `LogRecord`.

Methods inherited from class java.util.logging.Handler
`getEncoding, getErrorManager, getFilter, getFormatter, getLevel, isLoggable, reportError, setEncoding, setErrorManager, setFilter, setFormatter, setLevel`

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

Field Detail

### writerLock

    protected java.util.concurrent.locks.ReadWriteLock writerLock

  Lock used to control access to the writer.

Constructor Detail

### FileHandler

    public FileHandler()

### FileHandler

    public FileHandler(java.lang.String directory,
                       java.lang.String prefix,
                       java.lang.String suffix)

Method Detail

### publish

    public void publish(java.util.logging.LogRecord record)

  Format and publish a `LogRecord`.

  Specified by:
    `publish` in class `java.util.logging.Handler`
  Parameters:
    `record` - description of the log event

### close

    public void close()

  Close the currently open log file (if any).

  Specified by:
    `close` in class `java.util.logging.Handler`

### closeWriter

    protected void closeWriter()

### flush

    public void flush()

  Flush the writer.

  Specified by:
    `flush` in class `java.util.logging.Handler`

### open

    protected void open()

  Open the new log file for the date specified by `date`.

### openWriter

    protected void openWriter()

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

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.