wt.wrmf.logs
Class LogFileManager

java.lang.Object
  extended bywt.wrmf.logs.LogFileManager

public class LogFileManager
extends Object

operations on log files


Field Summary
protected  String endTag
           
protected  String filename
           
protected  EventLog log
           
protected  LogFilePolicy policy
           
 
Constructor Summary
LogFileManager(EventLog log, LogFilePolicy policy)
           
 
Method Summary
protected  void applyFilePolicy()
           
protected  void applyMaxBackupFilesPolicy()
           
protected  void applyMaxFileSizePolicy()
           
 void createLogFile()
           
protected  String getBackFilename(int segment)
           
 String getFilename()
           
static String getLogDirectory()
           
protected  void init()
           
protected  void initFilename()
           
 boolean isFileExists()
           
static void main(String[] args)
           
 EventLog writeRecord(LogRecord record)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected EventLog log

filename

protected String filename

policy

protected LogFilePolicy policy

endTag

protected String endTag
Constructor Detail

LogFileManager

public LogFileManager(EventLog log,
                      LogFilePolicy policy)
               throws IOException
Method Detail

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)