|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.util.logging.Formatter
public abstract class Formatter
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. |
| Method Summary | |
|---|---|
abstract String |
format(LogRecord r)
Formats a LogRecord object into a string representation. |
String |
formatMessage(LogRecord r)
Formats a LogRecord object into a localized string
representation. |
String |
getHead(Handler h)
Gets the head string used to wrap a set of log records. |
String |
getTail(Handler h)
Gets the tail string used to wrap a set of log records. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Formatter()
Formatter object.
| Method Detail |
|---|
public abstract String format(LogRecord r)
LogRecord object into a string representation.
The resulted string is usually localized and includes the message field
of the supplied LogRecord object.
r - the log record to be formatted into a string
public String formatMessage(LogRecord r)
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.
r - the log record to be formatted
@SuppressWarnings(value="unused") public String getHead(Handler h)
h - the target handler
@SuppressWarnings(value="unused") public String getTail(Handler h)
h - the target handler
|
Final | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||