com.norconex.jef.log
Class ThreadSafeLayout
java.lang.Object
org.apache.log4j.Layout
com.norconex.jef.log.ThreadSafeLayout
- All Implemented Interfaces:
- OptionHandler
public class ThreadSafeLayout
- extends Layout
Log layout decorator, prefixing any existing layout with the job
id associated with the current thread, separated with colon-space (": ").
If no jobs are associated with
a given log event, the prefix "[non-job]: " will get prepended.
- Author:
- Pascal Essiembre
- See Also:
FileLogManager
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThreadSafeLayout
public ThreadSafeLayout(Layout layout)
- Constructor.
- Parameters:
layout
- decorated layout
activateOptions
public void activateOptions()
format
public String format(LoggingEvent evt)
- Calls the decorated instance, prefixing with job identifier.
- Specified by:
format
in class Layout
- See Also:
Layout.format(org.apache.log4j.spi.LoggingEvent)
ignoresThrowable
public boolean ignoresThrowable()
- Specified by:
ignoresThrowable
in class Layout
Copyright © 2007-2013 Norconex Inc.. All Rights Reserved.