org.apache.cocoon.util.log
Class CocoonLogFormatter

java.lang.Object
  extended by org.apache.cocoon.util.log.ExtensiblePatternFormatter
      extended by org.apache.cocoon.util.log.CocoonLogFormatter
All Implemented Interfaces:
Formatter

Deprecated. This class will be removed in 2.2

public class CocoonLogFormatter
extends ExtensiblePatternFormatter

An extended pattern formatter. New patterns defined by this class are:

Version:
$Id: CocoonLogFormatter.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Sylvain Wallez, Vadim Gritsenko

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

DEFAULT_STACK_DEPTH

public static final int DEFAULT_STACK_DEPTH
Deprecated. 
The constant defining the default stack depth when none other is specified.

See Also:
Constant Field Values

TYPE_CLASS

protected static final int TYPE_CLASS
Deprecated. 
See Also:
Constant Field Values

TYPE_URI

protected static final int TYPE_URI
Deprecated. 
See Also:
Constant Field Values

TYPE_THREAD

protected static final int TYPE_THREAD
Deprecated. 
See Also:
Constant Field Values

TYPE_HOST

protected static final int TYPE_HOST
Deprecated. 
See Also:
Constant Field Values

TYPE_QUERY

protected static final int TYPE_QUERY
Deprecated. 
See Also:
Constant Field Values

TYPE_ROOTTHROWABLE

protected static final int TYPE_ROOTTHROWABLE
Deprecated. 
See Also:
Constant Field Values

TYPE_CLASS_STR

protected static final String TYPE_CLASS_STR
Deprecated. 
See Also:
Constant Field Values

TYPE_CLASS_SHORT_STR

protected static final String TYPE_CLASS_SHORT_STR
Deprecated. 
See Also:
Constant Field Values

TYPE_URI_STR

protected static final String TYPE_URI_STR
Deprecated. 
See Also:
Constant Field Values

TYPE_THREAD_STR

protected static final String TYPE_THREAD_STR
Deprecated. 
See Also:
Constant Field Values

TYPE_HOST_STR

protected static final String TYPE_HOST_STR
Deprecated. 
See Also:
Constant Field Values

TYPE_QUERY_STR

protected static final String TYPE_QUERY_STR
Deprecated. 
See Also:
Constant Field Values

TYPE_ROOTTHROWABLE_STR

protected static final String TYPE_ROOTTHROWABLE_STR
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

CocoonLogFormatter

public CocoonLogFormatter()
Deprecated. 
The depth to which stacktraces are printed out


CocoonLogFormatter

public CocoonLogFormatter(int stackDepth)
Deprecated. 
Method Detail

getTypeIdFor

protected int getTypeIdFor(String type)
Deprecated. 
Description copied from class: ExtensiblePatternFormatter
Retrieve the type-id for a particular string.

Overrides:
getTypeIdFor in class ExtensiblePatternFormatter
Parameters:
type - the string
Returns:
the type-id

formatPatternRun

protected String formatPatternRun(LogEvent event,
                                  ExtensiblePatternFormatter.PatternRun run)
Deprecated. 
Description copied from class: ExtensiblePatternFormatter
Formats a single pattern run (can be extended in subclasses).

Overrides:
formatPatternRun in class ExtensiblePatternFormatter
run - the pattern run to format.
Returns:
the formatted result.

getStackTrace

protected String getStackTrace(Throwable throwable,
                               String format)
Deprecated. 
Utility method to format stack trace so that CascadingExceptions are formatted with all nested exceptions.

FIXME: copied from AvalonFormatter, to be removed if ExtensiblePatternFormatter replaces PatternFormatter.

Overrides:
getStackTrace in class ExtensiblePatternFormatter
Parameters:
throwable - the throwable instance
format - ancilliary format parameter - allowed to be null
Returns:
the formatted string

getTime

protected String getTime(long time,
                         String pattern)
Deprecated. 
Utility method to format time.

Overrides:
getTime in class ExtensiblePatternFormatter
Parameters:
time - the time
pattern - ancilliary pattern parameter - allowed to be null
Returns:
the formatted string


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.