public class MySampleLayout2 extends LayoutBase<ILoggingEvent>
startedcontext| 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, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManagerpublic void setPrefix(String prefix)
public void setPrintThreadName(boolean printThreadName)
public String doLayout(ILoggingEvent event)
LayoutTaking 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–2022 QOS.ch. All rights reserved.