public class LogFile extends java.lang.Object implements IOutputManager, java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
LogFile()
Constructor for LogFile.
|
LogFile(java.lang.String fileName)
Constructor for LogFile with specified file name.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object | clone()
Returns a clone of the current object.
|
void | closeDevice()
Closes the log file.
|
protected void | finalize()
Closes the log device for cleanup.
|
java.lang.String | getLogFileName()
Returns the log file name;
|
protected java.io.OutputStream | getOutputStream(java.lang.String fileName)
Returns a generic file output stream to write to a local file.
|
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.
|
public static final java.lang.String COPYRIGHT
protected transient java.io.PrintWriter pWriter
public LogFile()
public LogFile(java.lang.String fileName)
public void closeDevice()
protected void finalize()
public long getTriggerSize()
public static void main(java.lang.String[] args)
protected void openDevice()
protected java.io.OutputStream getOutputStream(java.lang.String fileName) throws java.lang.Exception
public void print(java.lang.String message)
public java.lang.String getLogFileName()
public void setLogFileName(java.lang.String newLogFileName)
public void setTriggerSize(long newTriggerSize)
public void writeln(java.lang.String message)
protected java.lang.Object clone() throws java.lang.CloneNotSupportedException