| |
|
| java.lang.Object java.util.logging.Formatter
All known Subclasses: java.util.logging.XMLFormatter, java.util.logging.SimpleFormatter,
Formatter | abstract public class Formatter (Code) | | Formatter objects are used to format LogRecord
objects into a string representation. Head and tail strings are sometime used
to wrap a set of records. The getHead and getTail
methods are presented for this purpose.
|
Constructor Summary | |
protected | Formatter() Constructs a Formatter object. |
Formatter | protected Formatter()(Code) | | Constructs a Formatter object.
|
format | abstract public String format(LogRecord r)(Code) | | Formats a LogRecord object into a string representation.
The resulted string is usually localized and includes the message field
of the supplied LogRecord object.
Parameters: r - the log record to be formatted into a string the string resulted from the formatting |
formatMessage | public String formatMessage(LogRecord r)(Code) | | Formats a LogRecord object into a localized string
representation. This method can be regarded as a convenience for
subclasses of Formatter to use.
The message string is firstly localized using the
ResourceBundle object associated with the supplied
LogRecord .
Parameters: r - the log record to be formatted the string resulted from the formatting |
getHead | public String getHead(Handler h)(Code) | | Gets the head string used to wrap a set of log records. This base class
always returns the empty string.
Parameters: h - the target handler the head string used to wrap a set of log records |
getTail | public String getTail(Handler h)(Code) | | Gets the tail string used to wrap a set of log records. This base class
always returns the empty string.
Parameters: h - the target handler the tail string used to wrap a set of log records |
|
|
|