Syslog White Paper FAQ Examples JavaDoc Classloader
Protomatter Software v1.1.7

com.protomatter.syslog
Class OpenFileLog

java.lang.Object
  |
  +--com.protomatter.syslog.BasicLogger
        |
        +--com.protomatter.syslog.OpenFileLog
All Implemented Interfaces:
Syslogger

public class OpenFileLog
extends BasicLogger

A logger that opens the file for each log entry and closes it after it's done writing.

See Also:
XML configuration class

Fields inherited from class com.protomatter.syslog.BasicLogger
formatter, policy, realPolicy
 
Constructor Summary
OpenFileLog()
          You will need to call the configure() method if you use this constructor.
OpenFileLog(java.io.File f)
          Create an OpenFileLog attached to the given file.
 
Method Summary
 void flush()
          Flush the given logger's output.
 java.io.File getFile()
          Get the file we're writing to.
 void log(SyslogMessage message)
          Write a log message.
 void setFile(java.io.File f)
          Set the file we're writing to.
 void shutdown()
          Cleanup our file and prepare for shutdown.
 
Methods inherited from class com.protomatter.syslog.BasicLogger
formatLogEntry, getName, getPolicy, getTextFormatter, isSuspended, mightLog, resetDateFormat, resume, setName, setPolicy, setTextFormatter, shouldLog, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OpenFileLog

public OpenFileLog(java.io.File f)
Create an OpenFileLog attached to the given file.

OpenFileLog

public OpenFileLog()
You will need to call the configure() method if you use this constructor.
Method Detail

setFile

public void setFile(java.io.File f)
Set the file we're writing to.

getFile

public java.io.File getFile()
Get the file we're writing to.

log

public final void log(SyslogMessage message)
Write a log message.

shutdown

public void shutdown()
Cleanup our file and prepare for shutdown.

flush

public void flush()
Description copied from interface: Syslogger
Flush the given logger's output.

Protomatter Software v1.1.7
Copyright 1998-2002 Nate Sammons

Protomatter Software v1.1.7 http://protomatter.sourceforge.net/1.1.7