|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cocoon.util.log.XMLCocoonLogFormatter
public class XMLCocoonLogFormatter
A refactoring of org.apache.log.format.PatternFormatter
and org.apache.cocoon.util.log.CocoonLogFormatter for
producing XML format.
This formater formats the LogEntries according to given input types. Each
log entry is inside a <log-entry> element and each information is
inside an own element.
class : outputs the name of the class that has logged the
message. The optional short subformat removes the
package name. Warning : this pattern works only if formatting occurs in
the same thread as the call to Logger, i.e. it won't work with
AsyncLogTarget. The class name is embeded by a <class>
element.thread : outputs the name of the current thread (first element
on the context stack). The thread name is surrounded by a <thread>
element.uri : outputs the request URI (<uri>).category : outputs the log category (<category>).message : outputs the message (<message>).time : outputs the time (<time>).rtime : outputs the relative time (<relative-time>).throwable : outputs the exception (<throwable>).priority : outputs the priority (<priority>).host : outputs the request host header (<priority>).
| Nested Class Summary | |
|---|---|
static class |
XMLCocoonLogFormatter.CallStack
Deprecated. Hack to get the call stack as an array of classes. |
| Field Summary | |
|---|---|
protected SimpleDateFormat |
dateFormatter
Deprecated. |
protected static int |
TYPE_CATEGORY
Deprecated. |
protected static int |
TYPE_CLASS
Deprecated. |
protected static int |
TYPE_CLASS_SHORT
Deprecated. |
protected static String |
TYPE_CLASS_SHORT_STR
Deprecated. |
protected static String |
TYPE_CLASS_STR
Deprecated. |
protected static int |
TYPE_HOST
Deprecated. |
protected static int |
TYPE_MESSAGE
Deprecated. |
protected static int |
TYPE_PRIORITY
Deprecated. |
protected static int |
TYPE_RELATIVE_TIME
Deprecated. |
protected static int |
TYPE_REQUEST_URI
Deprecated. |
protected static int |
TYPE_THREAD
Deprecated. |
protected static int |
TYPE_THROWABLE
Deprecated. |
protected static int |
TYPE_TIME
Deprecated. |
protected int[] |
types
Deprecated. |
static String[] |
typeStrings
Deprecated. |
| Constructor Summary | |
|---|---|
XMLCocoonLogFormatter()
Deprecated. |
|
| Method Summary | |
|---|---|
String |
format(LogEvent event)
Deprecated. Format the event according to the pattern. |
protected int |
getTypeIdFor(String type)
Deprecated. Retrieve the type-id for a particular string. |
void |
setTypes(String typeString)
Deprecated. Set the types from a whitespace separated string |
void |
setTypes(String[] typeStrings)
Deprecated. Set the types from an array of strings. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String TYPE_CLASS_STR
protected static final String TYPE_CLASS_SHORT_STR
protected static final int TYPE_REQUEST_URI
protected static final int TYPE_CATEGORY
protected static final int TYPE_MESSAGE
protected static final int TYPE_TIME
protected static final int TYPE_RELATIVE_TIME
protected static final int TYPE_THROWABLE
protected static final int TYPE_PRIORITY
protected static final int TYPE_CLASS
protected static final int TYPE_CLASS_SHORT
protected static final int TYPE_THREAD
protected static final int TYPE_HOST
public static final String[] typeStrings
protected final SimpleDateFormat dateFormatter
protected int[] types
| Constructor Detail |
|---|
public XMLCocoonLogFormatter()
| Method Detail |
|---|
public String format(LogEvent event)
format in interface Formatterevent - the event
protected int getTypeIdFor(String type)
type - the string
public void setTypes(String[] typeStrings)
public void setTypes(String typeString)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||