Package ch.qos.logback.core.html
Class HTMLLayoutBase<E>
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- ch.qos.logback.core.LayoutBase<E>
-
- ch.qos.logback.core.html.HTMLLayoutBase<E>
-
- All Implemented Interfaces:
Layout<E>,ContextAware,LifeCycle
- Direct Known Subclasses:
HTMLLayout
public abstract class HTMLLayoutBase<E> extends LayoutBase<E>
This class is a base class for HTMLLayout classes part of other logback modules such as logback-classic and logback-access.
-
-
Constructor Summary
Constructors Constructor Description HTMLLayoutBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetContentType()Returns the content type output by this layout, i.e "text/html".CssBuildergetCssBuilder()Map<String,String>getEffectiveConverterMap()Returns a map where the default converter map is merged with the map contained in the context.StringgetFileFooter()Returns the appropriate HTML footers.StringgetFileHeader()Returns appropriate HTML headers.StringgetPattern()Returns the value of the ConversionPattern option.StringgetPresentationFooter()Return the footer of the logging event formatting.StringgetPresentationHeader()Return the header of the logging event formatting.StringgetTitle()Returns the current value of the Title option.voidsetCssBuilder(CssBuilder cssBuilder)voidsetPattern(String conversionPattern)Set the ConversionPattern option.voidsetTitle(String title)The Title option takes a String value.voidstart()Parses the pattern and creates the Converter linked list.-
Methods inherited from class ch.qos.logback.core.LayoutBase
getContext, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, stop
-
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
-
setPattern
public void setPattern(String conversionPattern)
Set the ConversionPattern option. This is the string which controls formatting and consists of a mix of literal content and conversion specifiers.
-
getPattern
public String getPattern()
Returns the value of the ConversionPattern option.
-
getCssBuilder
public CssBuilder getCssBuilder()
-
setCssBuilder
public void setCssBuilder(CssBuilder cssBuilder)
-
start
public void start()
Parses the pattern and creates the Converter linked list.- Specified by:
startin interfaceLifeCycle- Overrides:
startin classLayoutBase<E>
-
getEffectiveConverterMap
public Map<String,String> getEffectiveConverterMap()
Returns a map where the default converter map is merged with the map contained in the context.
-
setTitle
public void setTitle(String title)
The Title option takes a String value. This option sets the document title of the generated HTML document.Defaults to 'Logback Log Messages'.
-
getTitle
public String getTitle()
Returns the current value of the Title option.
-
getContentType
public String getContentType()
Returns the content type output by this layout, i.e "text/html".- Specified by:
getContentTypein interfaceLayout<E>- Overrides:
getContentTypein classLayoutBase<E>- Returns:
-
getFileHeader
public String getFileHeader()
Returns appropriate HTML headers.- Specified by:
getFileHeaderin interfaceLayout<E>- Overrides:
getFileHeaderin classLayoutBase<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>- Overrides:
getPresentationHeaderin classLayoutBase<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>- Overrides:
getPresentationFooterin classLayoutBase<E>- Returns:
- The footer.
-
getFileFooter
public String getFileFooter()
Returns the appropriate HTML footers.- Specified by:
getFileFooterin interfaceLayout<E>- Overrides:
getFileFooterin classLayoutBase<E>- Returns:
- The footer.
-
-