Package org.omegat.util.logging
Class OmegaTFileHandler
- java.lang.Object
-
- java.util.logging.Handler
-
- java.util.logging.StreamHandler
-
- org.omegat.util.logging.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'.
-
-
Constructor Summary
Constructors Constructor Description OmegaTFileHandler()
-
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)
-
-
-
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 classjava.util.logging.StreamHandler
- Throws:
java.lang.SecurityException
-
publish
public void publish(java.util.logging.LogRecord record)
- Overrides:
publish
in classjava.util.logging.StreamHandler
-
-