Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.log4j
Class PatternLayout

    java.lang.Object
      org.apache.log4j.Layout
          org.apache.log4j.PatternLayout

    public class PatternLayout

extends Layout

Field Summary

Fields inherited from class org.apache.log4j.Layout
`LINE_SEP_LEN`

Constructor Summary
`PatternLayout(String pattern)`

Method Summary
`String` | `format(LoggingEvent event)` Implement this method to create your own layout format.
`boolean` | `ignoresThrowable()` If the layout handles the throwable object contained within `LoggingEvent`, then the layout should return `false`.

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

### PatternLayout

    public PatternLayout(String pattern)

Method Detail

### format

    public String format(LoggingEvent event)

  Description copied from class: `Layout`
  Implement this method to create your own layout format.

  Specified by:
    `format` in class `Layout`
  Parameters:
    `event` - The LoggingEvent.
  Returns:
    The formatted LoggingEvent.

### 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`. If ignoresThrowable is true, the appender is responsible for rendering the throwable.

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

  Specified by:
    `ignoresThrowable` in class `Layout`
  Returns:
    true if the Layout ignores Throwables.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.