Top Description Fields Constructors Methods
ch.qos.logback.classic.html

public Class HTMLLayout

extends HTMLLayoutBase<ILoggingEvent>
Class Inheritance
Imports
java.util.Map, ch.qos.logback.classic.PatternLayout, ch.qos.logback.classic.pattern.MDCConverter, ch.qos.logback.classic.spi.ILoggingEvent, ch.qos.logback.core.helpers.Transform, ch.qos.logback.core.html.HTMLLayoutBase, .IThrowableRenderer, ch.qos.logback.core.pattern.Converter

HTMLLayout outputs events in an HTML table.

The content of the table columns are specified using a conversion pattern. See ch.qos.logback.classic.PatternLayout for documentation on the available patterns.

For more information about this layout, please refer to the online manual at http://logback.qos.ch/manual/layouts.html#ClassicHTMLLayout

Authors
Ceki Gülcü, Sébastien Pennec

Field Summary

Modifier and TypeField and Description
pack-priv static final String
DEFAULT_CONVERSION_PATTERN

Default pattern string for log output.

pack-priv IThrowableRenderer<ILoggingEvent>
Inherited from ch.qos.logback.core.html.HTMLLayoutBase:
countercssBuilderheadpatterntitle

Constructor Summary

AccessConstructor and Description
public
HTMLLayout()

Constructs a PatternLayout using the DEFAULT_LAYOUT_PATTERN.

Method Summary

Modifier and TypeMethod and Description
private void
protected String
public String
doLayout(ILoggingEvent
The event to format
event
)

Implements ch.qos.logback.core.Layout.doLayout.

Transform an event (of type Object) and return it as a String after appropriate formatting.
protected Map<String, String>
public IThrowableRenderer<ILoggingEvent>
public void
public void
start()

Overrides ch.qos.logback.core.html.HTMLLayoutBase.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

Parses the pattern and creates the Converter linked list.
Inherited from ch.qos.logback.core.html.HTMLLayoutBase:
getContentTypegetCssBuildergetEffectiveConverterMapgetFileFootergetFileHeadergetPatterngetPresentationFootergetPresentationHeadergetTitlesetCssBuildersetPatternsetTitlestartNewTableIfLimitReached

Field Detail

DEFAULT_CONVERSION_PATTERNback to summary
pack-priv static final String DEFAULT_CONVERSION_PATTERN

Default pattern string for log output.

throwableRendererback to summary
pack-priv IThrowableRenderer<ILoggingEvent> throwableRenderer

Constructor Detail

HTMLLayoutback to summary
public HTMLLayout()

Constructs a PatternLayout using the DEFAULT_LAYOUT_PATTERN. The default pattern just produces the application supplied message.

Method Detail

appendEventToBufferback to summary
private void appendEventToBuffer(StringBuilder buf, Converter<ILoggingEvent> c, ILoggingEvent event)
computeConverterNameback to summary
protected String computeConverterName(Converter<ILoggingEvent> c)

Overrides ch.qos.logback.core.html.HTMLLayoutBase.computeConverterName.

Annotations
@Override
doLayoutback to summary
public String doLayout(ILoggingEvent event)

Implements ch.qos.logback.core.Layout.doLayout.

Doc from ch.qos.logback.core.Layout.doLayout.

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:ILoggingEvent

The event to format

Returns:String

the event formatted as a String

getDefaultConverterMapback to summary
protected Map<String, String> getDefaultConverterMap()

Implements abstract ch.qos.logback.core.html.HTMLLayoutBase.getDefaultConverterMap.

getThrowableRendererback to summary
public IThrowableRenderer<ILoggingEvent> getThrowableRenderer()
setThrowableRendererback to summary
public void setThrowableRenderer(IThrowableRenderer<ILoggingEvent> throwableRenderer)
startback to summary
public void start()

Overrides ch.qos.logback.core.html.HTMLLayoutBase.start.

Implements ch.qos.logback.core.spi.LifeCycle.start.

Doc from ch.qos.logback.core.html.HTMLLayoutBase.start.

Parses the pattern and creates the Converter linked list.

Annotations
@Override