|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jlog2.channel.LogChannel
org.jlog2.channel.FileChannel
public class FileChannel
This class provides a channel to log messages to a file.
Constructor Summary | |
---|---|
FileChannel(java.lang.String theFilePath,
int theMaxSize,
int theBackupNumber)
Create a new instance of FileChannel. |
Method Summary | |
---|---|
protected void |
createLogChannel()
Create the file channel. |
void |
finalize()
Cleanup any open channels. |
void |
resetChannel(int theMaxSize,
int theBackupNumber)
Reset the FileChannel's file size and number of backups. |
void |
writeError(java.lang.String message)
Write an exception to the file channel. |
void |
writeMessage(java.lang.String message)
Write the message to the file channel. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileChannel(java.lang.String theFilePath, int theMaxSize, int theBackupNumber) throws java.lang.Exception
theFilePath
- the path of the file to create.theMaxSize
- the maximum allowed size of the file.theBackupNumber
- the maximum number of previous files to keep.
java.lang.Exception
- any error.Method Detail |
---|
public void resetChannel(int theMaxSize, int theBackupNumber) throws java.lang.Exception
theMaxSize
- the maximum allowed size of the file.theBackupNumber
- the maximum number of previous files to keep.
java.lang.Exception
- any error.protected void createLogChannel() throws java.lang.Exception
createLogChannel
in class LogChannel
java.lang.Exception
- any error.public void writeMessage(java.lang.String message) throws java.lang.Exception
writeMessage
in class LogChannel
message
- the message to write.
java.lang.Exception
- any error.public void writeError(java.lang.String message) throws java.lang.Exception
writeError
in class LogChannel
message
- the message to write.
java.lang.Exception
- any error.public void finalize()
finalize
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |