wt.wrmf.logs
Class LogFileManager
java.lang.Object
wt.wrmf.logs.LogFileManager
- public class LogFileManager
- extends Object
operations on log files
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected EventLog log
filename
protected String filename
policy
protected LogFilePolicy policy
endTag
protected String endTag
LogFileManager
public LogFileManager(EventLog log,
LogFilePolicy policy)
throws IOException
getFilename
public String getFilename()
isFileExists
public boolean isFileExists()
init
protected void init()
throws IOException
- Throws:
IOException
initFilename
protected void initFilename()
throws IOException
- Throws:
IOException
getBackFilename
protected String getBackFilename(int segment)
throws IOException
- Throws:
IOException
getLogDirectory
public static String getLogDirectory()
throws IOException
- Throws:
IOException
createLogFile
public void createLogFile()
throws IOException
- Throws:
IOException
writeRecord
public EventLog writeRecord(LogRecord record)
throws IOException,
WTException,
WTPropertyVetoException
- Throws:
IOException
WTException
WTPropertyVetoException
applyFilePolicy
protected void applyFilePolicy()
throws WTException,
WTPropertyVetoException,
IOException
- Throws:
WTException
WTPropertyVetoException
IOException
applyMaxFileSizePolicy
protected void applyMaxFileSizePolicy()
throws WTException,
WTPropertyVetoException,
IOException
- Throws:
WTException
WTPropertyVetoException
IOException
applyMaxBackupFilesPolicy
protected void applyMaxBackupFilesPolicy()
throws WTException,
WTPropertyVetoException,
IOException
- Throws:
WTException
WTPropertyVetoException
IOException
main
public static void main(String[] args)