|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.util.log.ExtensiblePatternFormatter org.apache.cocoon.util.log.CocoonLogFormatter
public class CocoonLogFormatter
An extended pattern formatter. New patterns defined by this class are:
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
.uri
: Outputs the request URI.query
: Outputs the request query stringthread
: Outputs the name of the current thread (first element
on the context stack).host
: Outputs the request host header.rootThrowable
: Outputs the root throwable message and
stacktrace.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.cocoon.util.log.ExtensiblePatternFormatter |
---|
ExtensiblePatternFormatter.PatternRun |
Field Summary | |
---|---|
static int |
DEFAULT_STACK_DEPTH
Deprecated. The constant defining the default stack depth when none other is specified. |
protected static int |
TYPE_CLASS
Deprecated. |
protected static String |
TYPE_CLASS_SHORT_STR
Deprecated. |
protected static String |
TYPE_CLASS_STR
Deprecated. |
protected static int |
TYPE_HOST
Deprecated. |
protected static String |
TYPE_HOST_STR
Deprecated. |
protected static int |
TYPE_QUERY
Deprecated. |
protected static String |
TYPE_QUERY_STR
Deprecated. |
protected static int |
TYPE_ROOTTHROWABLE
Deprecated. |
protected static String |
TYPE_ROOTTHROWABLE_STR
Deprecated. |
protected static int |
TYPE_THREAD
Deprecated. |
protected static String |
TYPE_THREAD_STR
Deprecated. |
protected static int |
TYPE_URI
Deprecated. |
protected static String |
TYPE_URI_STR
Deprecated. |
Fields inherited from class org.apache.cocoon.util.log.ExtensiblePatternFormatter |
---|
m_formatSpecification, MAX_TYPE, TYPE_CATEGORY, TYPE_CATEGORY_STR, TYPE_MESSAGE, TYPE_MESSAGE_STR, TYPE_PRIORITY, TYPE_PRIORITY_STR, TYPE_RELATIVE_TIME, TYPE_RELATIVE_TIME_STR, TYPE_TEXT, TYPE_THROWABLE, TYPE_THROWABLE_STR, TYPE_TIME, TYPE_TIME_STR |
Constructor Summary | |
---|---|
CocoonLogFormatter()
Deprecated. The depth to which stacktraces are printed out |
|
CocoonLogFormatter(int stackDepth)
Deprecated. |
Method Summary | |
---|---|
protected String |
formatPatternRun(LogEvent event,
ExtensiblePatternFormatter.PatternRun run)
Deprecated. Formats a single pattern run (can be extended in subclasses). |
protected String |
getStackTrace(Throwable throwable,
String format)
Deprecated. Utility method to format stack trace so that CascadingExceptions are formatted with all nested exceptions. |
protected String |
getTime(long time,
String pattern)
Deprecated. Utility method to format time. |
protected int |
getTypeIdFor(String type)
Deprecated. Retrieve the type-id for a particular string. |
Methods inherited from class org.apache.cocoon.util.log.ExtensiblePatternFormatter |
---|
addPatternRun, addTextRun, append, fix, format, getCategory, getMessage, getPriority, parse, setFormat |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_STACK_DEPTH
protected static final int TYPE_CLASS
protected static final int TYPE_URI
protected static final int TYPE_THREAD
protected static final int TYPE_HOST
protected static final int TYPE_QUERY
protected static final int TYPE_ROOTTHROWABLE
protected static final String TYPE_CLASS_STR
protected static final String TYPE_CLASS_SHORT_STR
protected static final String TYPE_URI_STR
protected static final String TYPE_THREAD_STR
protected static final String TYPE_HOST_STR
protected static final String TYPE_QUERY_STR
protected static final String TYPE_ROOTTHROWABLE_STR
Constructor Detail |
---|
public CocoonLogFormatter()
public CocoonLogFormatter(int stackDepth)
Method Detail |
---|
protected int getTypeIdFor(String type)
ExtensiblePatternFormatter
getTypeIdFor
in class ExtensiblePatternFormatter
type
- the string
protected String formatPatternRun(LogEvent event, ExtensiblePatternFormatter.PatternRun run)
ExtensiblePatternFormatter
formatPatternRun
in class ExtensiblePatternFormatter
run
- the pattern run to format.
protected String getStackTrace(Throwable throwable, String format)
FIXME: copied from AvalonFormatter, to be removed if ExtensiblePatternFormatter replaces PatternFormatter.
getStackTrace
in class ExtensiblePatternFormatter
throwable
- the throwable instanceformat
- ancilliary format parameter - allowed to be null
protected String getTime(long time, String pattern)
getTime
in class ExtensiblePatternFormatter
time
- the timepattern
- ancilliary pattern parameter - allowed to be null
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |