edu.cmu.sphinx.util
Class SphinxLogFormatter
java.lang.Object
java.util.logging.Formatter
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
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 |
SphinxLogFormatter
public SphinxLogFormatter()
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.
- Parameters:
record
- the record to format
- Returns:
- the formatted string