edu.cmu.sphinx.util
Class SphinxLogFormatter

java.lang.Object
  extended by java.util.logging.Formatter
      extended by edu.cmu.sphinx.util.SphinxLogFormatter

public class SphinxLogFormatter
extends java.util.logging.Formatter

Provides a log formatter for use with sphinx. This formatter generates nicer looking console messages than the default formatter. To use the formatter, set the property

java.util.logging.ConsoleHandler.formatter to edu.cmu.sphinx.util.SphinxLogFormatter

This is typically done in a custom loger.properties file


Constructor Summary
SphinxLogFormatter()
           
 
Method Summary
 java.lang.String format(java.util.logging.LogRecord record)
          Formats the given log record and return the formatted string.
 boolean getTerse()
          Retrieves the level of output
 void setTerse(boolean terse)
          Sets the level of output
 
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SphinxLogFormatter

public SphinxLogFormatter()
Method Detail

setTerse

public void setTerse(boolean terse)
Sets the level of output

Parameters:
terse - if true, the output level should be terse

getTerse

public boolean getTerse()
Retrieves the level of output

Returns:
the level of output

format

public java.lang.String format(java.util.logging.LogRecord record)
Formats the given log record and return the formatted string.

Specified by:
format in class java.util.logging.Formatter
Parameters:
record - the record to format
Returns:
the formatted string