FileDocCategorySizeDatePackage
Layout.javaAPI DocApache log4j 1.2.152457Sat Aug 25 00:09:42 BST 2007org.apache.log4j

Layout

public abstract class Layout extends Object implements OptionHandler
Extend this abstract class to create your own log layout format.
author
Ceki Gülcü

Fields Summary
public static final String
LINE_SEP
public static final int
LINE_SEP_LEN
Constructors Summary
Methods Summary
public abstract java.lang.Stringformat(org.apache.log4j.spi.LoggingEvent event)
Implement this method to create your own layout format.

public java.lang.StringgetContentType()
Returns the content type output by this layout. The base class returns "text/plain".



                 
  
  
    

                          
  
    
    return "text/plain";
  
public java.lang.StringgetFooter()
Returns the footer for the layout format. The base class returns null.

    return null;
  
public java.lang.StringgetHeader()
Returns the header for the layout format. The base class returns null.

    return null;
  
public abstract booleanignoresThrowable()
If the layout handles the throwable object contained within {@link LoggingEvent}, then the layout should return false. Otherwise, if the layout ignores throwable object, then the layout should return true.

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

since
0.8.4