public class MySampleLayout2 extends LayoutBase<ILoggingEvent>
started
context
Constructor and Description |
---|
MySampleLayout2() |
Modifier and Type | Method and Description |
---|---|
String |
doLayout(ILoggingEvent event)
Transform an event (of type Object) and return it as a String after
appropriate formatting.
|
void |
setPrefix(String prefix) |
void |
setPrintThreadName(boolean printThreadName) |
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, start, stop
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManager
public void setPrefix(String prefix)
public void setPrintThreadName(boolean printThreadName)
public String doLayout(ILoggingEvent event)
Layout
Taking in an object and returning a String is the least sophisticated way of formatting events. However, it is remarkably CPU-effective.
event
- The event to formatCopyright © 2005–2016 QOS.ch. All rights reserved.