Search in sources :

Example 1 with HighTemporalResolutionFormatter

use of com.ms.silverking.log.HighTemporalResolutionFormatter in project SilverKing by Morgan-Stanley.

the class TerminatorAsyncLogger method getLogger.

private Logger getLogger() throws FileNotFoundException {
    synchronized (this) {
        // not really needed yet, but TerminatorAsyncLogger is exposed to more than one thread
        if (log == null) {
            PrintStream ps = new PrintStream(new File(logFileName));
            log = Logger.getLogger(argusLoggerName);
            Formatter formatter = new HighTemporalResolutionFormatter();
            handler = new StreamHandler(ps, formatter);
            log.addHandler(handler);
            log.setLevel(Level.ALL);
        }
        return log;
    }
}
Also used : PrintStream(java.io.PrintStream) HighTemporalResolutionFormatter(com.ms.silverking.log.HighTemporalResolutionFormatter) HighTemporalResolutionFormatter(com.ms.silverking.log.HighTemporalResolutionFormatter) Formatter(java.util.logging.Formatter) StreamHandler(java.util.logging.StreamHandler) File(java.io.File)

Aggregations

HighTemporalResolutionFormatter (com.ms.silverking.log.HighTemporalResolutionFormatter)1 File (java.io.File)1 PrintStream (java.io.PrintStream)1 Formatter (java.util.logging.Formatter)1 StreamHandler (java.util.logging.StreamHandler)1