Apache Tomcat 7.0.28

org.apache.juli
Class FileHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by org.apache.juli.FileHandler
Direct Known Subclasses:
AsyncFileHandler

public class FileHandler
extends Handler

Implementation of Handler that appends log messages to a file named {prefix}{date}{suffix} in a configured directory.

The following configuration properties are available:

Version:
$Id: FileHandler.java 1162172 2011-08-26 17:12:33Z markt $

Field Summary
protected  ReadWriteLock writerLock
          Lock used to control access to the writer.
 
Constructor Summary
FileHandler()
           
FileHandler(String directory, String prefix, 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(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 ReadWriteLock writerLock
Lock used to control access to the writer.

Constructor Detail

FileHandler

public FileHandler()

FileHandler

public FileHandler(String directory,
                   String prefix,
                   String suffix)
Method Detail

publish

public void publish(LogRecord record)
Format and publish a LogRecord.

Specified by:
publish in class 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 Handler

closeWriter

protected void closeWriter()

flush

public void flush()
Flush the writer.

Specified by:
flush in class Handler

open

protected void open()
Open the new log file for the date specified by date.


openWriter

protected void openWriter()

Apache Tomcat 7.0.28

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