Log4j 1.3alpha-3

org.apache.log4j.chainsaw.layout
Class EventDetailLayout

java.lang.Object
  |
  +--org.apache.log4j.Layout
        |
        +--org.apache.log4j.chainsaw.layout.EventDetailLayout
All Implemented Interfaces:
OptionHandler

public class EventDetailLayout
extends Layout

This layout is used for formatting HTML text for use inside the Chainsaw Event Detail Panel, and the tooltip used when mouse-over on a particular log event row. It relies an an internal PatternLayout to accomplish this, but ensures HTML characters from any LoggingEvent are escaped first.

Author:
Paul Smith

Field Summary
 
Fields inherited from class org.apache.log4j.Layout
charArrayWriter, ignoresThrowable, LINE_SEP, LINE_SEP_LEN
 
Constructor Summary
EventDetailLayout()
           
 
Method Summary
 void activateOptions()
          Activate the options that were previously set with calls to option setters.
 void format(java.io.Writer output, LoggingEvent event)
           
 java.lang.String getConversionPattern()
           
 java.lang.String getFooter()
          Returns the footer for the layout format.
 java.lang.String getHeader()
          Returns the header for the layout format.
 boolean ignoresThrowable()
          If the layout handles the throwable object contained within LoggingEvent, then the layout should return false.
 void setConversionPattern(java.lang.String conversionPattern)
           
 
Methods inherited from class org.apache.log4j.Layout
format, getContentType, setFooter, setHeader, setIgnoresThrowable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventDetailLayout

public EventDetailLayout()
Method Detail

setConversionPattern

public void setConversionPattern(java.lang.String conversionPattern)

getConversionPattern

public java.lang.String getConversionPattern()

getFooter

public java.lang.String getFooter()
Description copied from class: Layout
Returns the footer for the layout format. There is no default footer.

Overrides:
getFooter in class Layout

getHeader

public java.lang.String getHeader()
Description copied from class: Layout
Returns the header for the layout format. There is no default header.

Overrides:
getHeader in class Layout

ignoresThrowable

public boolean ignoresThrowable()
Description copied from class: Layout
If the layout handles the throwable object contained within LoggingEvent, then the layout should return false. Otherwise, if the layout ignores throwable object, then the layout should return true.

By default, SimpleLayout, TTCCLayout, PatternLayout all return true. The XMLLayout returns false.

As of log4j version 1.3, ignoresThrowable is a settable property. Thus, you can override, a layout's default setting.

Overrides:
ignoresThrowable in class Layout

activateOptions

public void activateOptions()
Description copied from interface: OptionHandler
Activate the options that were previously set with calls to option setters.

This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.

For example, the FileAppender has the File and Append options both of which are ambigous until the other is also set.


format

public void format(java.io.Writer output,
                   LoggingEvent event)
            throws java.io.IOException
Specified by:
format in class Layout
java.io.IOException

Log4j 1.3alpha-3

Copyright 2000-2003 Apache Software Foundation.