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

com.protomatter.syslog
Class FileLog

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

public class FileLog
extends BasicLogger

A logger that simply writes to a file.

See Also:
XML configuration class

Fields inherited from class com.protomatter.syslog.BasicLogger
formatter, policy, realPolicy
 
Constructor Summary
FileLog()
          You will need to call the configure() method if you use this constructor.
FileLog(java.io.File f)
          Create a new file log attached to the given file.
FileLog(java.io.File f, boolean append, boolean autoFlush)
          Create a new file log attached to the given file.
 
Method Summary
 void flush()
          Flush the given logger's output.
 boolean getAppend()
          Get the file we're writing to.
 boolean getAutoFlush()
          Determine if we should we auto-flush the buffer all the time.
 java.io.File getFile()
          Get the file we're writing to.
 void log(SyslogMessage message)
          Log a message.
 void setAppend(boolean append)
          Set the file we're writing to.
 void setAutoFlush(boolean flush)
          Should we auto-flush the buffer all the time?
 void setFile(java.io.File f)
          Set the file we're writing to.
 void shutdown()
          Closes down the file and prepares 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

FileLog

public FileLog(java.io.File f)
Create a new file log attached to the given file.

FileLog

public FileLog(java.io.File f,
               boolean append,
               boolean autoFlush)
Create a new file log attached to the given file.

FileLog

public FileLog()
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.

setAppend

public void setAppend(boolean append)
Set the file we're writing to.

getAppend

public boolean getAppend()
Get the file we're writing to.

setAutoFlush

public void setAutoFlush(boolean flush)
Should we auto-flush the buffer all the time?

getAutoFlush

public boolean getAutoFlush()
Determine if we should we auto-flush the buffer all the time.

log

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

shutdown

public void shutdown()
Closes down the file and prepares 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