|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.util.FileAppender
public class FileAppender
This appender logs messages to a file using JSR75 (FileConnection) The appender tracks the file size and if it exceeds a given maximum size (customizable by clients) then the current log file is renamed appending a .old to the log name and a new one is created. Therefore the maximum size on this is about 2 times the maxFileSize (this is not accurate as there is no limit on the size of the single message printed).
Constructor Summary | |
---|---|
FileAppender(java.lang.String path,
java.lang.String fileName)
Default constructor |
Method Summary | |
---|---|
void |
closeLogFile()
Close connection and streams |
void |
deleteLogFile()
Delete the log file |
void |
initLogFile()
Init the logger |
void |
openLogFile()
FileAppender doesn't implement this method |
void |
setMaxFileSize(long maxFileSize)
Sets the maximum file size. |
void |
writeLogMessage(java.lang.String level,
java.lang.String msg)
FileAppender writes one message to the output file |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileAppender(java.lang.String path, java.lang.String fileName)
Method Detail |
---|
public void setMaxFileSize(long maxFileSize)
public void writeLogMessage(java.lang.String level, java.lang.String msg)
writeLogMessage
in interface Appender
public void initLogFile()
initLogFile
in interface Appender
public void openLogFile()
openLogFile
in interface Appender
public void closeLogFile()
closeLogFile
in interface Appender
public void deleteLogFile()
deleteLogFile
in interface Appender
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |