org.apache.juli
Class FileHandler

java.lang.Object
  extended by java.util.logging.Handler
      extended by 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:
$Revision: 666 $ $Date: 2008-06-12 16:11:25 +0200 (Thu, 12 Jun 2008) $

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).
 void flush()
          Flush the writer.
 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
 

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

flush

public void flush()
Flush the writer.

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


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