Home » apache-log4j-1.2.16 » org.apache » log4j » [javadoc | source]
org.apache.log4j
abstract public class: Layout [javadoc | source]
java.lang.Object
   org.apache.log4j.Layout

All Implemented Interfaces:
    OptionHandler

Direct Known Subclasses:
    XMLLayout, HTMLLayout, PatternLayout, EnhancedPatternLayout, MyPatternLayout, SimpleLayout, DateLayout, TTCCLayout

Extend this abstract class to create your own log layout format.
Field Summary
public static final  String LINE_SEP     
public static final  int LINE_SEP_LEN     
Method from org.apache.log4j.Layout Summary:
format,   getContentType,   getFooter,   getHeader,   ignoresThrowable
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.log4j.Layout Detail:
 abstract public String format(LoggingEvent event)
    Implement this method to create your own layout format.
 public String getContentType() 
    Returns the content type output by this layout. The base class returns "text/plain".
 public String getFooter() 
    Returns the footer for the layout format. The base class returns null.
 public String getHeader() 
    Returns the header for the layout format. The base class returns null.
 abstract public boolean ignoresThrowable()
    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. If ignoresThrowable is true, the appender is responsible for rendering the throwable.

    The SimpleLayout , TTCCLayout , PatternLayout all return true. The org.apache.log4j.xml.XMLLayout returns false.