org.apache.log4j
Class PatternLayout
java.lang.Object
org.apache.log4j.Layout
org.apache.log4j.PatternLayout
public class PatternLayout
- extends Layout
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PatternLayout
public PatternLayout(String pattern)
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 org.apache.log4j.xml.XMLLayout
returns false
.
- Specified by:
ignoresThrowable
in class Layout
- Returns:
- true if the Layout ignores Throwables.
Copyright © 1999-2014 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.