java.lang.Object | +--com.ibm.commerce.ras.LogFile
LogFile is used to define the file output of the Logging service.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT IBM copyright notice field. |
protected
java.io.PrintWriter |
pWriter The PrintWriter that sends a formatted log event to its
destination. |
Constructor Summary | |
---|---|
LogFile() Constructor for LogFile. | |
LogFile(java.lang.String fileName) Constructor for LogFile with specified file name. |
Method Summary | |
---|---|
void |
closeDevice() Closes the log file. |
protected
void |
finalize() Closes the log device for cleanup. |
long |
getTriggerSize() Gets the trigger size of the file. |
static void |
main(java.lang.String[] args) A test example. |
protected
void |
openDevice() Opens a new log file. |
void |
print(java.lang.String message) Writes to the log file. |
void |
setLogFileName(java.lang.String newLogFileName) Sets the log file name. |
void |
setTriggerSize(long newTriggerSize) Sets the maximum size of the file, in KB. |
void |
writeln(java.lang.String message) Writes 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 |
---|
public static final java.lang.String COPYRIGHT
protected transient java.io.PrintWriter pWriter
PrintWriter
that sends a formatted log event to its
destination.
Constructor Detail |
---|
public LogFile()
public LogFile(java.lang.String fileName)
fileName
- file name to write logs toMethod Detail |
---|
public void closeDevice()
protected void finalize()
finalize
in class
java.lang.Object
public long getTriggerSize()
public static void main(java.lang.String[] args)
protected void openDevice()
public void print(java.lang.String message)
print
in interface
IOutputManager
message
- stringpublic void setLogFileName(java.lang.String newLogFileName)
newLogFileName
- log file namepublic void setTriggerSize(long newTriggerSize)
newTriggerSize
- long: the maximum file size in
KBytes.public void writeln(java.lang.String message)
message
- string