|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.logging.Formatter
org.objectweb.util.monolog.wrapper.javaLog.MonologFormatter
public class MonologFormatter
The goal of this class is to format a LogRecord with regard to a pattern. In order to support support additional logging layer on top monolog, this class permits to specify package name or class names of its own logging layer. By default the org.apache.commons.logging package is included. To specify the list of names you have to assign the system property 'monolog.wrappers' with a list (separated with commas or white spaces) of your names.
| Field Summary | |
|---|---|
static String |
WRAPPERS_PROPERTY
|
| Constructor Summary | |
|---|---|
MonologFormatter()
|
|
MonologFormatter(String strPattern)
|
|
| Method Summary | |
|---|---|
void |
format(Date date,
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" |
String |
format(LogRecord record)
Format the given log record and return the formatted string. |
String |
format(String msg,
String levelName,
String topic,
long time)
|
static String[] |
getContext()
Calculate the class name, the method name and the line number of the logger user. |
protected String |
getLogInfoValue(Character pattern)
Gets value of an extension log info |
String |
getPattern()
|
void |
setPattern(String p)
|
| Methods inherited from class java.util.logging.Formatter |
|---|
formatMessage, getHead, getTail |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String WRAPPERS_PROPERTY
| Constructor Detail |
|---|
public MonologFormatter()
public MonologFormatter(String strPattern)
| Method Detail |
|---|
public String getPattern()
public void setPattern(String p)
public String format(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 Formatterrecord - the log record to be formatted.
public static String[] getContext()
public void format(Date date,
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 to
public String format(String msg,
String levelName,
String topic,
long time)
protected String getLogInfoValue(Character pattern)
pattern - log info pattern
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||