public class MonologFormatter
extends java.util.logging.Formatter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
WRAPPERS_PROPERTY |
Constructor and Description |
---|
MonologFormatter() |
MonologFormatter(java.lang.String strPattern) |
Modifier and Type | Method and Description |
---|---|
void |
format(java.util.Date date,
java.lang.StringBuffer sbuf)
Appends to
sbuf the time in the format
"YYYY-MM-DD HH:mm:ss,SSS" for example, "2004-04-28 15:49:37,459" |
java.lang.String |
format(java.util.logging.LogRecord record)
Format the given log record and return the formatted string.
|
java.lang.String |
format(java.lang.String msg,
java.lang.String levelName,
java.lang.String topic,
long time) |
static java.lang.String[] |
getContext()
Calculate the class name, the method name and the line number of the
logger user.
|
java.lang.String |
getPattern() |
void |
setPattern(java.lang.String p) |
public static final java.lang.String WRAPPERS_PROPERTY
public MonologFormatter()
public MonologFormatter(java.lang.String strPattern)
public java.lang.String getPattern()
public void setPattern(java.lang.String p)
public java.lang.String format(java.util.logging.LogRecord record)
The resulting formatted String will normally include a localized and formated version of the LogRecord's message field. The Formatter.formatMessage convenience method can (optionally) be used to localize and format the message field.
format
in class java.util.logging.Formatter
record
- the log record to be formatted.public static java.lang.String[] getContext()
public void format(java.util.Date date, java.lang.StringBuffer sbuf)
sbuf
the time in the format
"YYYY-MM-DD HH:mm:ss,SSS" for example, "2004-04-28 15:49:37,459"date
- the date to formatsbuf
- the string buffer to write topublic java.lang.String format(java.lang.String msg, java.lang.String levelName, java.lang.String topic, long time)