com.ibm.commerce.ras
Class LogFile

java.lang.Object
  |
  +--com.ibm.commerce.ras.LogFile
All Implemented Interfaces:
IOutputManager

public final class LogFile
extends java.lang.Object
implements IOutputManager

LogFile is used to define the file output of the Logging service.


Field Summary
static java.lang.String COPYRIGHT
           
protected  java.io.PrintWriter pWriter
          The PrintWriter that sends a formatted log event to its destination.
 
Constructor Summary
LogFile()
          LogFile constructor comment.
LogFile(java.lang.String fileName)
          LogFile constructor comment.
 
Method Summary
 void closeDevice()
          Close the log file.
protected  void finalize()
          Close the log device for cleanup.
 long getTriggerSize()
          Get the trigger size of the file.
static void main(java.lang.String[] args)
          Run a testing example.
protected  void openDevice()
          Open a new log file.
 void print(java.lang.String message)
          Write to the log file.
 void setLogFileName(java.lang.String newLogFileName)
          Set the log file name.
 void setTriggerSize(long newTriggerSize)
          Set the maximum size of the file, in KB.
 void writeln(java.lang.String message)
          Write the message to the log file.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT

public static final java.lang.String COPYRIGHT

pWriter

protected transient java.io.PrintWriter pWriter
The PrintWriter that sends a formatted log event to its destination.
Constructor Detail

LogFile

public LogFile()
LogFile constructor comment.

LogFile

public LogFile(java.lang.String fileName)
LogFile constructor comment.
Method Detail

closeDevice

public void closeDevice()
Close the log file.

finalize

protected void finalize()
Close the log device for cleanup.
Overrides:
finalize in class java.lang.Object

getTriggerSize

public long getTriggerSize()
Get the trigger size of the file.

main

public static void main(java.lang.String[] args)
Run a testing example.

openDevice

protected void openDevice()
Open a new log file.

print

public void print(java.lang.String message)
Write to the log file.
Specified by:
print in interface IOutputManager
Parameters:
message - String

setLogFileName

public void setLogFileName(java.lang.String newLogFileName)
Set the log file name.
Parameters:
newLogFileName - String

setTriggerSize

public void setTriggerSize(long newTriggerSize)
Set the maximum size of the file, in KB. When this size is reached, another file is open
Parameters:
newTriggerSize - long: the size in KBytes.

writeln

public void writeln(java.lang.String message)
Write the message to the log file.
Parameters:
message - String