java.lang.Object | ||
↳ | org.apache.log4j.Layout | |
↳ | org.apache.log4j.HTMLLayout |
This layout outputs events in a HTML table. 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.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | LOCATION_INFO_OPTION | This constant is deprecated. Options are now handled using the JavaBeans paradigm. This constant is not longer needed and will be removed in the near term. | |||||||||
String | TITLE_OPTION | A string constant used in naming the option for setting the the HTML document title. |
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
BUF_SIZE | |||||||||||
MAX_CAPACITY |
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.log4j.Layout
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
No options to activate.
| |||||||||||
Implement this method to create your own layout format.
| |||||||||||
Returns the content type output by this layout, i.e "text/html".
| |||||||||||
Returns the appropriate HTML footers.
| |||||||||||
Returns appropriate HTML headers.
| |||||||||||
Returns the current value of the LocationInfo option.
| |||||||||||
Returns the current value of the Title option.
| |||||||||||
The HTML layout handles the throwable contained in logging
events.
| |||||||||||
The LocationInfo option takes a boolean value.
| |||||||||||
The Title option takes a String value.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.apache.log4j.Layout
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
org.apache.log4j.spi.OptionHandler
|
This constant is deprecated.
Options are now handled using the JavaBeans paradigm.
This constant is not longer needed and will be removed in the
near term.
A string constant used in naming the option for setting the the location information flag. Current value of this string constant is LocationInfo.
Note that all option keys are case sensitive.
A string constant used in naming the option for setting the the HTML document title. Current value of this string constant is Title.
No options to activate.
Returns the content type output by this layout, i.e "text/html".
Returns the appropriate HTML footers.
Returns appropriate HTML headers.
Returns the current value of the LocationInfo option.
Returns the current value of the Title option.
The HTML layout handles the throwable contained in logging
events. Hence, this method return false
.
The LocationInfo option takes a boolean value. By default, it is set to false which means there will be no location information output by this layout. If the the option is set to true, then the file name and line number of the statement at the origin of the log statement will be output.
If you are embedding this layout within an SMTPAppender
then make sure to set the
LocationInfo option of that appender as well.
The Title option takes a String value. This option sets the document title of the generated HTML document.
Defaults to 'Log4J Log Messages'.