Package ch.qos.logback.core
Class LayoutBase<E>
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.LayoutBase<E>
-
- All Implemented Interfaces:
Layout<E>,ContextAware,LifeCycle
- Direct Known Subclasses:
EchoLayout,HTMLLayoutBase,PatternLayoutBase,TTLLLayout,XMLLayout
public abstract class LayoutBase<E> extends ContextAwareBase implements Layout<E>
-
-
Constructor Summary
Constructors Constructor Description LayoutBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()Returns the content type as appropriate for the implementation.ContextgetContext()StringgetFileFooter()Return the file footer for this layout.StringgetFileHeader()Return the file header for this layout.StringgetPresentationFooter()Return the footer of the logging event formatting.StringgetPresentationHeader()Return the header of the logging event formatting.booleanisStarted()voidsetContext(Context context)voidsetFileFooter(String footer)voidsetFileHeader(String header)voidsetPresentationFooter(String footer)voidsetPresentationHeader(String header)voidstart()voidstop()-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getStatusManager
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Method Detail
-
setContext
public void setContext(Context context)
- Specified by:
setContextin interfaceContextAware- Overrides:
setContextin classContextAwareBase
-
getContext
public Context getContext()
- Specified by:
getContextin interfaceContextAware- Overrides:
getContextin classContextAwareBase
-
getFileHeader
public String getFileHeader()
Description copied from interface:LayoutReturn the file header for this layout. The returned value may be null.- Specified by:
getFileHeaderin interfaceLayout<E>- Returns:
- The header.
-
getPresentationHeader
public String getPresentationHeader()
Description copied from interface:LayoutReturn the header of the logging event formatting. The returned value may be null.- Specified by:
getPresentationHeaderin interfaceLayout<E>- Returns:
- The header.
-
getPresentationFooter
public String getPresentationFooter()
Description copied from interface:LayoutReturn the footer of the logging event formatting. The returned value may be null.- Specified by:
getPresentationFooterin interfaceLayout<E>- Returns:
- The footer.
-
getFileFooter
public String getFileFooter()
Description copied from interface:LayoutReturn the file footer for this layout. The returned value may be null.- Specified by:
getFileFooterin interfaceLayout<E>- Returns:
- The footer.
-
getContentType
public String getContentType()
Description copied from interface:LayoutReturns the content type as appropriate for the implementation.- Specified by:
getContentTypein interfaceLayout<E>- Returns:
-
setFileHeader
public void setFileHeader(String header)
-
setFileFooter
public void setFileFooter(String footer)
-
setPresentationHeader
public void setPresentationHeader(String header)
-
setPresentationFooter
public void setPresentationFooter(String footer)
-
-