public class HTMLLayout extends Layout
限定符和类型 | 字段和说明 |
---|---|
protected int |
BUF_SIZE |
static java.lang.String |
LOCATION_INFO_OPTION
已过时。
Options are now handled using the JavaBeans paradigm.
This constant is not longer needed and will be removed in the
near term.
|
protected int |
MAX_CAPACITY |
static java.lang.String |
TITLE_OPTION
A string constant used in naming the option for setting the the
HTML document title.
|
LINE_SEP, LINE_SEP_LEN
构造器和说明 |
---|
HTMLLayout() |
限定符和类型 | 方法和说明 |
---|---|
void |
activateOptions()
No options to activate.
|
java.lang.String |
format(LoggingEvent event)
Implement this method to create your own layout format.
|
java.lang.String |
getContentType()
Returns the content type output by this layout, i.e "text/html".
|
java.lang.String |
getFooter()
Returns the appropriate HTML footers.
|
java.lang.String |
getHeader()
Returns appropriate HTML headers.
|
boolean |
getLocationInfo()
Returns the current value of the LocationInfo option.
|
java.lang.String |
getTitle()
Returns the current value of the Title option.
|
boolean |
ignoresThrowable()
The HTML layout handles the throwable contained in logging
events.
|
void |
setLocationInfo(boolean flag)
The LocationInfo option takes a boolean value.
|
void |
setTitle(java.lang.String title)
The Title option takes a String value.
|
protected final int BUF_SIZE
protected final int MAX_CAPACITY
public static final java.lang.String LOCATION_INFO_OPTION
Note that all option keys are case sensitive.
public static final java.lang.String TITLE_OPTION
public void setLocationInfo(boolean flag)
If you are embedding this layout within an SMTPAppender
then make sure to set the
LocationInfo option of that appender as well.
public boolean getLocationInfo()
public void setTitle(java.lang.String title)
Defaults to 'Log4J Log Messages'.
public java.lang.String getTitle()
public java.lang.String getContentType()
getContentType
在类中 Layout
public void activateOptions()
public java.lang.String format(LoggingEvent event)
Layout
public java.lang.String getHeader()
public java.lang.String getFooter()
public boolean ignoresThrowable()
false
.ignoresThrowable
在类中 Layout