Project Wonder 2.0

er.extensions
Class ERXPatternLayout

java.lang.Object
  extended byorg.apache.log4j.Layout
      extended byorg.apache.log4j.PatternLayout
          extended byer.extensions.ERXPatternLayout
All Implemented Interfaces:
OptionHandler

public class ERXPatternLayout
extends PatternLayout

The ERXPatternLayout adds some additional (and needed) layout options. The first is by specifing an '@' character a full backtrace will be logged as part of the log event. The second is by specifing an '$' char the current application name of the WOApplication will be logged as part of the log event. Finally by specifing an '#' char the current port number on which the primary adaptor listens to will be logged as part of the log event.

 WebObjects Applicaion Info Patterns
 Example: %W{n[i:p s]} -- MyApp[9300:2001 28] 
 
 n: application name
 i: pid (process ID, provided through Java system property "com.webobjects.pid") 
 p: primary adaptor's port number
 s: active session count
 
 Java VM (Virtual Machine) Info Patterns
 Example: %V{u used/f free} -- 75.22 MB used/12.86 MB free
 
 t: total memory
 u: used memory 
 f: free memory in the current heap size (not max)
 
 


Field Summary
 
Fields inherited from class org.apache.log4j.PatternLayout
BUF_SIZE, DEFAULT_CONVERSION_PATTERN, MAX_CAPACITY, TTCC_CONVERSION_PATTERN
 
Fields inherited from class org.apache.log4j.Layout
LINE_SEP, LINE_SEP_LEN
 
Constructor Summary
ERXPatternLayout()
          Default constructor.
ERXPatternLayout(String pattern)
          Default constructor.
 
Method Summary
 PatternParser createPatternParser(String pattern)
          Creates a pattern parser for the given pattern.
static ERXPatternLayout instance()
           
 
Methods inherited from class org.apache.log4j.PatternLayout
activateOptions, format, getConversionPattern, ignoresThrowable, setConversionPattern
 
Methods inherited from class org.apache.log4j.Layout
getContentType, getFooter, getHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ERXPatternLayout

public ERXPatternLayout()
Default constructor. Uses the default conversion pattern.


ERXPatternLayout

public ERXPatternLayout(String pattern)
Default constructor. Uses the specified conversion pattern.

Parameters:
pattern - layout to be used.
Method Detail

instance

public static ERXPatternLayout instance()

createPatternParser

public PatternParser createPatternParser(String pattern)
Creates a pattern parser for the given pattern. This method is called implicitly by the log4j logging system.

Parameters:
pattern - to create the pattern parser for
Returns:
an ERXPatternParser for the given pattern

Last updated: Do, Dez 9, 2004 • 12:46 PM CET

Copyright © 2002 – 2004 Project Wonder.