com.mobixess.jodb.util.logging
Class SimpleConsoleHandler
java.lang.Object
java.util.logging.Handler
java.util.logging.StreamHandler
java.util.logging.ConsoleHandler
com.mobixess.jodb.util.logging.SimpleConsoleHandler
public class SimpleConsoleHandler
- extends java.util.logging.ConsoleHandler
Method Summary |
java.lang.String |
format(java.util.logging.LogRecord record)
Format the given LogRecord. |
java.lang.String |
formatMessage(java.util.logging.LogRecord record)
Localize and format the message string from a log record. |
protected java.lang.String |
getLineAndSrc()
|
void |
publish(java.util.logging.LogRecord record)
|
Methods inherited from class java.util.logging.ConsoleHandler |
close |
Methods inherited from class java.util.logging.StreamHandler |
flush, isLoggable, setEncoding, setOutputStream |
Methods inherited from class java.util.logging.Handler |
getEncoding, getErrorManager, getFilter, getFormatter, getLevel, reportError, setErrorManager, setFilter, setFormatter, setLevel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleConsoleHandler
public SimpleConsoleHandler()
publish
public void publish(java.util.logging.LogRecord record)
- Overrides:
publish
in class java.util.logging.ConsoleHandler
format
public java.lang.String format(java.util.logging.LogRecord record)
- Format the given LogRecord.
- Parameters:
record
- the log record to be formatted.
- Returns:
- a formatted log record
getLineAndSrc
protected java.lang.String getLineAndSrc()
formatMessage
public java.lang.String formatMessage(java.util.logging.LogRecord record)
- Localize and format the message string from a log record. This
method is provided as a convenience for Formatter subclasses to
use when they are performing formatting.
The message string is first localized to a format string using
the record's ResourceBundle. (If there is no ResourceBundle,
or if the message key is not found, then the key is used as the
format string.) The format String uses java.text style
formatting.
- If there are no parameters, no formatter is used.
- Otherwise, if the string contains "{0" then
java.text.MessageFormat is used to format the string.
- Otherwise no formatting is performed.
- Parameters:
record
- the log record containing the raw message
- Returns:
- a localized and formatted message
Copyright © Mobixess Inc. All Rights Reserved.