Package com.logicaldoc.util.log4j
Class LDHtmlLayout
java.lang.Object
org.apache.logging.log4j.core.layout.AbstractLayout<String>
org.apache.logging.log4j.core.layout.AbstractStringLayout
com.logicaldoc.util.log4j.LDHtmlLayout
- All Implemented Interfaces:
- org.apache.logging.log4j.core.impl.LocationAware,- org.apache.logging.log4j.core.Layout<String>,- org.apache.logging.log4j.core.layout.Encoder<org.apache.logging.log4j.core.LogEvent>,- org.apache.logging.log4j.core.StringLayout
@Plugin(name="LDHtmlLayout",
        category="Core",
        elementType="layout",
        printObject=true)
public class LDHtmlLayout
extends org.apache.logging.log4j.core.layout.AbstractStringLayout
Outputs events as rows in an HTML table on an HTML page.
 
Appenders using this layout should have their encoding set to UTF-8 or UTF-16, otherwise events containing non ASCII characters could result in corrupted log files.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classstatic enumPossible font sizesNested classes/interfaces inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayoutorg.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer, org.apache.logging.log4j.core.layout.AbstractStringLayout.Serializer2
- 
Field SummaryFieldsFields inherited from interface org.apache.logging.log4j.core.LayoutELEMENT_TYPE
- 
Method SummaryModifier and TypeMethodDescriptionstatic LDHtmlLayoutCreates an HTML Layout using the default settings.byte[]Returns the appropriate HTML footers.byte[]Returns appropriate HTML headers.getTitle()booleanstatic LDHtmlLayout.BuilderbooleantoSerializable(org.apache.logging.log4j.core.LogEvent event) Formats as a String.Methods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayoutgetCharset, getFooterSerializer, getHeaderSerializer, toByteArrayMethods inherited from class org.apache.logging.log4j.core.layout.AbstractLayoutencode, getConfiguration, getContentFormatMethods inherited from class java.lang.Objectequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.core.layout.EncoderencodeMethods inherited from interface org.apache.logging.log4j.core.LayoutgetContentFormat
- 
Field Details- 
DEFAULT_FONT_FAMILYDefault font family: "arial,sans-serif".- See Also:
 
 
- 
- 
Method Details- 
getTitle
- 
isLocationInfopublic boolean isLocationInfo()
- 
requiresLocationpublic boolean requiresLocation()- Specified by:
- requiresLocationin interface- org.apache.logging.log4j.core.impl.LocationAware
- Overrides:
- requiresLocationin class- org.apache.logging.log4j.core.layout.AbstractStringLayout
 
- 
toSerializableFormats as a String.- Parameters:
- event- The Logging Event.
- Returns:
- A String containing the LogEvent as HTML.
 
- 
getContentType- Specified by:
- getContentTypein interface- org.apache.logging.log4j.core.Layout<String>
- Overrides:
- getContentTypein class- org.apache.logging.log4j.core.layout.AbstractStringLayout
 
- 
getHeaderpublic byte[] getHeader()Returns appropriate HTML headers.- Specified by:
- getHeaderin interface- org.apache.logging.log4j.core.Layout<String>
- Overrides:
- getHeaderin class- org.apache.logging.log4j.core.layout.AbstractStringLayout
- Returns:
- The header as a byte array.
 
- 
createDefaultLayoutCreates an HTML Layout using the default settings.- Returns:
- an HTML Layout.
 
- 
newBuilder
 
-