Logback API
Version 0.9.8

ch.qos.logback.core.html
Class HTMLLayoutBase<E>

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<E>
All Implemented Interfaces:
Layout<E>, ContextAware, LifeCycle
Direct Known Subclasses:
HTMLLayout, HTMLLayout

public abstract class HTMLLayoutBase<E>
extends LayoutBase<E>

This class is a base class for logback component-specific HTMLLayout classes

Author:
Sébastien Pennec

Field Summary
protected  long counter
           
protected  CssBuilder cssBuilder
           
protected  Converter<E> head
           
protected  String pattern
           
protected static int ROW_LIMIT
           
protected  IThrowableRenderer throwableRenderer
           
protected  String 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
HTMLLayoutBase()
           
 
Method Summary
protected  String computeConverterName(Converter c)
           
 String getContentType()
          Returns the content type output by this layout, i.e "text/html".
 CssBuilder getCssBuilder()
           
protected abstract  Map<String,String> getDefaultConverterMap()
           
 String getFileFooter()
          Returns the appropriate HTML footers.
 String getFileHeader()
          Returns appropriate HTML headers.
 String getPattern()
          Returns the value of the ConversionPattern option.
 String getPresentationFooter()
          Return the footer of the logging event formatting.
 String getPresentationHeader()
          Return the header of the logging event formatting.
 IThrowableRenderer getThrowableRenderer()
           
 String getTitle()
          Returns the current value of the Title option.
protected  void handleTableClosing(StringBuffer sbuf)
           
 void setCssBuilder(CssBuilder cssBuilder)
           
 void setPattern(String conversionPattern)
          Set the ConversionPattern option.
 void setThrowableRenderer(IThrowableRenderer throwableRenderer)
           
 void setTitle(String title)
          The Title option takes a String value.
 void start()
          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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ch.qos.logback.core.Layout
doLayout
 
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn
 

Field Detail

pattern

protected String pattern

head

protected Converter<E> head

title

protected String title

cssBuilder

protected CssBuilder cssBuilder

throwableRenderer

protected IThrowableRenderer throwableRenderer

counter

protected long counter

ROW_LIMIT

protected static final int ROW_LIMIT
See Also:
Constant Field Values
Constructor Detail

HTMLLayoutBase

public HTMLLayoutBase()
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:
start in interface LifeCycle
Overrides:
start in class LayoutBase<E>

getDefaultConverterMap

protected abstract Map<String,String> getDefaultConverterMap()

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:
getContentType in interface Layout<E>
Overrides:
getContentType in class LayoutBase<E>
Returns:

getFileHeader

public String getFileHeader()
Returns appropriate HTML headers.

Specified by:
getFileHeader in interface Layout<E>
Overrides:
getFileHeader in class LayoutBase<E>
Returns:
The header.

getPresentationHeader

public String getPresentationHeader()
Description copied from interface: Layout
Return the header of the logging event formatting. The returned value may be null.

Specified by:
getPresentationHeader in interface Layout<E>
Overrides:
getPresentationHeader in class LayoutBase<E>
Returns:
The header.

getPresentationFooter

public String getPresentationFooter()
Description copied from interface: Layout
Return the footer of the logging event formatting. The returned value may be null.

Specified by:
getPresentationFooter in interface Layout<E>
Overrides:
getPresentationFooter in class LayoutBase<E>
Returns:
The footer.

getFileFooter

public String getFileFooter()
Returns the appropriate HTML footers.

Specified by:
getFileFooter in interface Layout<E>
Overrides:
getFileFooter in class LayoutBase<E>
Returns:
The footer.

handleTableClosing

protected void handleTableClosing(StringBuffer sbuf)

computeConverterName

protected String computeConverterName(Converter c)

getThrowableRenderer

public IThrowableRenderer getThrowableRenderer()

setThrowableRenderer

public void setThrowableRenderer(IThrowableRenderer throwableRenderer)

Logback API
Version 0.9.8

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