Project Wonder 5.0

er.extensions.logging
Class ERXPatternLayout

java.lang.Object
  extended by org.apache.log4j.Layout
      extended by org.apache.log4j.PatternLayout
          extended by er.extensions.logging.ERXPatternLayout
All Implemented Interfaces:
org.apache.log4j.spi.OptionHandler
Direct Known Subclasses:
ERXPatternLayout

public class ERXPatternLayout
extends org.apache.log4j.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)
 m: max memory
 
 


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(java.lang.String pattern)
          Default constructor.
 
Method Summary
 org.apache.log4j.helpers.PatternParser createPatternParser(java.lang.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(java.lang.String pattern)
Default constructor. Uses the specified conversion pattern.

Parameters:
pattern - layout to be used.
Method Detail

instance

public static ERXPatternLayout instance()

createPatternParser

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

Overrides:
createPatternParser in class org.apache.log4j.PatternLayout
Parameters:
pattern - to create the pattern parser for
Returns:
an ERXPatternParser for the given pattern

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.