Class RepositoryImportHTMLLayout
- java.lang.Object
-
- org.pentaho.platform.plugin.services.importexport.RepositoryImportHTMLLayout
-
- All Implemented Interfaces:
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
public class RepositoryImportHTMLLayout extends Object implements org.apache.logging.log4j.core.StringLayout
This class was derived from Log4j HTMLLayout. 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.- Author:
- tkafalas
-
-
Constructor Summary
Constructors Constructor Description RepositoryImportHTMLLayout(org.apache.logging.log4j.Level loggerLogLevel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
activateOptions()
No options to activate.void
encode(org.apache.logging.log4j.core.LogEvent source, org.apache.logging.log4j.core.layout.ByteBufferDestination destination)
String
format(org.apache.logging.log4j.core.LogEvent event)
Charset
getCharset()
Map<String,String>
getContentFormat()
String
getContentType()
Returns the content type output by this layout, i.e "text/html".byte[]
getFooter()
Returns the appropriate HTML footers.byte[]
getHeader()
Returns appropriate HTML headers.String
getTitle()
Returns the current value of the Title option.boolean
ignoresThrowable()
The HTML layout handles the throwable contained in logging events.void
setTitle(String title)
The Title option takes a String value.byte[]
toByteArray(org.apache.logging.log4j.core.LogEvent event)
String
toSerializable(org.apache.logging.log4j.core.LogEvent event)
-
-
-
Field Detail
-
BUF_SIZE
protected static final int BUF_SIZE
- See Also:
- Constant Field Values
-
MAX_CAPACITY
protected static final int MAX_CAPACITY
- See Also:
- Constant Field Values
-
fontCss
protected static final String fontCss
- See Also:
- Constant Field Values
-
thCss
protected static final String thCss
- See Also:
- Constant Field Values
-
LINE_SEP
public static final String LINE_SEP
-
-
Method Detail
-
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 'Log4J 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 interfaceorg.apache.logging.log4j.core.Layout<String>
-
getContentFormat
public Map<String,String> getContentFormat()
- Specified by:
getContentFormat
in interfaceorg.apache.logging.log4j.core.Layout<String>
-
activateOptions
public void activateOptions()
No options to activate.
-
format
public String format(org.apache.logging.log4j.core.LogEvent event)
-
getHeader
public byte[] getHeader()
Returns appropriate HTML headers.- Specified by:
getHeader
in interfaceorg.apache.logging.log4j.core.Layout<String>
- Returns:
-
toByteArray
public byte[] toByteArray(org.apache.logging.log4j.core.LogEvent event)
- Specified by:
toByteArray
in interfaceorg.apache.logging.log4j.core.Layout<String>
-
getFooter
public byte[] getFooter()
Returns the appropriate HTML footers.- Specified by:
getFooter
in interfaceorg.apache.logging.log4j.core.Layout<String>
- Returns:
-
ignoresThrowable
public boolean ignoresThrowable()
The HTML layout handles the throwable contained in logging events. Hence, this method returnfalse
.
-
toSerializable
public String toSerializable(org.apache.logging.log4j.core.LogEvent event)
- Specified by:
toSerializable
in interfaceorg.apache.logging.log4j.core.Layout<String>
-
encode
public void encode(org.apache.logging.log4j.core.LogEvent source, org.apache.logging.log4j.core.layout.ByteBufferDestination destination)
- Specified by:
encode
in interfaceorg.apache.logging.log4j.core.layout.Encoder<org.apache.logging.log4j.core.LogEvent>
-
getCharset
public Charset getCharset()
- Specified by:
getCharset
in interfaceorg.apache.logging.log4j.core.StringLayout
-
-