Class OmegaTFileHandler


  • public class OmegaTFileHandler
    extends java.util.logging.StreamHandler
    File handler for standard logging for support logrotating(on startup only) and file naming with datetime part. This handler will create 'OmegaT.log' for OmegaT(and OmegaT-1.log, OmegaT-2.log for next instances which runned in the same time). logrotate will work only on create handler, i.e. logs from one OmegaT run will be only in one log file. It means, what log file can be much longer than maxinum file size. Maximum file size used only on startup for decide: should we rotate logs or not. Rotated logs will be named like 'OmegaT.20080325.1800.log'.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      java.lang.String getOmegaTLogFileName()  
      void publish​(java.util.logging.LogRecord record)  
      • Methods inherited from class java.util.logging.StreamHandler

        flush, isLoggable, setEncoding
      • Methods inherited from class java.util.logging.Handler

        getEncoding, getErrorManager, getFilter, getFormatter, getLevel, setErrorManager, setFilter, setFormatter, setLevel
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • OmegaTFileHandler

        public OmegaTFileHandler()
                          throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • getOmegaTLogFileName

        public java.lang.String getOmegaTLogFileName()
        Returns:
        the name of the current log file
      • close

        public void close()
                   throws java.lang.SecurityException
        Overrides:
        close in class java.util.logging.StreamHandler
        Throws:
        java.lang.SecurityException
      • publish

        public void publish​(java.util.logging.LogRecord record)
        Overrides:
        publish in class java.util.logging.StreamHandler