HiRISE

HiRISE.HiPlan.Utilities
Class LoggingUtilities.LogFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by HiRISE.HiPlan.Utilities.LoggingUtilities.LogFormatter
Enclosing class:
LoggingUtilities

public static class LoggingUtilities.LogFormatter
extends Formatter

A formatter for HiPlan logs. It formats log records on three lines:

        SeqNum YYYY-MM-DDTHH:mm:ss.SSS Thd XX Lvl LL SourceClass.SourceMethod()
        SeqNum Message

SeqNum is the sequence number. XX is the ID of the thread originating the message. LL is the message level. SourceClass is the name of the class originating the message. SourceMethod is the method originating the message. Leading and trailing whitespace will be trimmed from the message itself.

If a Throwable is attached to the log record, a stack trace is printed as well.

Version:
1.2
Author:
Christian Schaller - UA/PIRL

Constructor Summary
LoggingUtilities.LogFormatter()
          Creates a new log formatter.
 
Method Summary
 String format(LogRecord record)
          Formats a log record.
 
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingUtilities.LogFormatter

public LoggingUtilities.LogFormatter()
Creates a new log formatter.

Method Detail

format

public String format(LogRecord record)
Formats a log record.

Specified by:
format in class Formatter
Parameters:
record - the log record to format; may contain an attached exception, which will also be printed.
Returns:
the formatted string.

HiRISE

Copyright (C) Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona