com.caucho.log
Class MessageFormatter
java.lang.Object
java.util.logging.Formatter
com.caucho.log.MessageFormatter
- Direct Known Subclasses:
- ELFormatter
public class MessageFormatter
- extends java.util.logging.Formatter
A simple formatter that handles localization, substitution of
parameters, and the inclusion of an exception stack trace if applicable.
Method Summary |
java.lang.String |
format(java.util.logging.LogRecord record)
|
java.lang.String |
formatMessage(java.util.logging.LogRecord record)
The "formatted" log message, after localization, substitution of
parameters, and the inclusion of an exception stack trace if applicable. |
Methods inherited from class java.util.logging.Formatter |
getHead, getTail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MessageFormatter
public MessageFormatter()
format
public java.lang.String format(java.util.logging.LogRecord record)
- Specified by:
format
in class java.util.logging.Formatter
formatMessage
public java.lang.String formatMessage(java.util.logging.LogRecord record)
- The "formatted" log message, after localization, substitution of
parameters, and the inclusion of an exception stack trace if applicable.
During formatting, if the source logger has a localization
ResourceBundle and if that ResourceBundle has an entry for
this message string, then the message string is replaced
with the localized value.
If the message has parameters, java.text.MessageFormat is used to format
the message with the parameters.
If the log record has an associated exception, the stack trace is
appended to the log message.
- Overrides:
formatMessage
in class java.util.logging.Formatter
- See Also:
MessageFormat
,
java.lang.Throwable.printStackTrace()