Package chapters.layouts
Class MySampleLayout2
- All Implemented Interfaces:
Layout<ILoggingEvent>
,ContextAware
,LifeCycle
-
Field Summary
FieldsFields inherited from class ch.qos.logback.core.LayoutBase
started
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoLayout
(ILoggingEvent event) Transform an event (of type Object) and return it as a String after appropriate formatting.void
void
setPrintThreadName
(boolean printThreadName) Methods inherited from class ch.qos.logback.core.LayoutBase
getContentType, getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, start, stop
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManager
-
Field Details
-
prefix
String prefix -
printThreadName
boolean printThreadName
-
-
Constructor Details
-
MySampleLayout2
public MySampleLayout2()
-
-
Method Details
-
setPrefix
-
setPrintThreadName
public void setPrintThreadName(boolean printThreadName) -
doLayout
Description copied from interface:Layout
Transform an event (of type Object) and return it as a String after appropriate formatting.Taking in an object and returning a String is the least sophisticated way of formatting events. However, it is remarkably CPU-effective.
- Parameters:
event
- The event to format- Returns:
- the event formatted as a String
-