Logback API
Version 0.9.8

ch.qos.logback.classic.html
Class HTMLLayout

java.lang.Object
  extended by ch.qos.logback.core.spi.ContextAwareBase
      extended by ch.qos.logback.core.LayoutBase<E>
          extended by ch.qos.logback.core.html.HTMLLayoutBase<LoggingEvent>
              extended by ch.qos.logback.classic.html.HTMLLayout
All Implemented Interfaces:
Layout<LoggingEvent>, ContextAware, LifeCycle

public class HTMLLayout
extends HTMLLayoutBase<LoggingEvent>

HTMLLayout outputs events in an HTML table.

The content of the table columns are specified using a conversion pattern. See 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

Author:
Ceki Gülcü, Sébastien Pennec

Field Summary
 
Fields inherited from class ch.qos.logback.core.html.HTMLLayoutBase
counter, cssBuilder, head, pattern, ROW_LIMIT, throwableRenderer, title
 
Fields inherited from class ch.qos.logback.core.LayoutBase
started
 
Fields inherited from interface ch.qos.logback.core.Layout
LINE_SEP, LINE_SEP_LEN
 
Constructor Summary
HTMLLayout()
          Constructs a PatternLayout using the DEFAULT_LAYOUT_PATTERN.
 
Method Summary
 String doLayout(LoggingEvent event)
          Transform an event (of type Object) and return it as a String after appropriate formatting.
protected  Map<String,String> getDefaultConverterMap()
           
 
Methods inherited from class ch.qos.logback.core.html.HTMLLayoutBase
computeConverterName, getContentType, getCssBuilder, getFileFooter, getFileHeader, getPattern, getPresentationFooter, getPresentationHeader, getThrowableRenderer, getTitle, handleTableClosing, setCssBuilder, setPattern, setThrowableRenderer, setTitle, start
 
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn
 

Constructor Detail

HTMLLayout

public HTMLLayout()
Constructs a PatternLayout using the DEFAULT_LAYOUT_PATTERN. The default pattern just produces the application supplied message.

Method Detail

getDefaultConverterMap

protected Map<String,String> getDefaultConverterMap()
Specified by:
getDefaultConverterMap in class HTMLLayoutBase<LoggingEvent>

doLayout

public String doLayout(LoggingEvent 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

Logback API
Version 0.9.8

Copyright © 2005-2008 QOS.ch. All Rights Reserved.