chapters.layouts
Class MySampleLayout
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.LayoutBase<ILoggingEvent>
chapters.layouts.MySampleLayout
- All Implemented Interfaces:
- Layout<ILoggingEvent>, ContextAware, LifeCycle
public class MySampleLayout
- extends LayoutBase<ILoggingEvent>
Method Summary |
String |
doLayout(ILoggingEvent event)
Transform an event (of type Object) and return it as a String after
appropriate formatting. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MySampleLayout
public MySampleLayout()
doLayout
public String doLayout(ILoggingEvent event)
- 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
Copyright © 2005-2013 QOS.ch. All Rights Reserved.