|
Log4j 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.Layout | +--org.apache.log4j.HTMLLayout
This layout outputs events in a HTML table.
Field Summary | |
protected int |
BUF_SIZE
|
static String |
LOCATION_INFO_OPTION
Deprecated. 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 String |
TITLE_OPTION
A string constant used in naming the option for setting the the HTML document title. |
Fields inherited from class org.apache.log4j.Layout |
LINE_SEP, LINE_SEP_LEN |
Constructor Summary | |
HTMLLayout()
|
Method Summary | |
void |
activateOptions()
No options to activate. |
String |
format(LoggingEvent event)
Implement this method to create your own layout format. |
String |
getContentType()
Returns the content type output by this layout, i.e "text/html". |
String |
getFooter()
Returns the appropriate HTML footers. |
String |
getHeader()
Returns appropriate HTML headers. |
boolean |
getLocationInfo()
Returns the current value of the LocationInfo option. |
String[] |
getOptionStrings()
Deprecated. We now use JavaBeans introspection to configure components. Options strings are no longer needed. |
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 |
setOption(String key,
String value)
Deprecated. Use the setter method for the option directly instead of the generic setOption method. |
void |
setTitle(String title)
The Title option takes a String value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected final int BUF_SIZE
protected final int MAX_CAPACITY
public static final String LOCATION_INFO_OPTION
Note that all option keys are case sensitive.
public static final String TITLE_OPTION
Constructor Detail |
public HTMLLayout()
Method Detail |
public String[] getOptionStrings()
LOCATION_INFO_OPTION
.public void setOption(String key, String value)
setOption
method.
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.
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(String title)
Defaults to 'Log4J Log Messages'.
public String getTitle()
public String getContentType()
getContentType
in class Layout
public void activateOptions()
public String format(LoggingEvent event)
Layout
format
in class Layout
public String getHeader()
getHeader
in class Layout
public String getFooter()
getFooter
in class Layout
public boolean ignoresThrowable()
false
.ignoresThrowable
in class Layout
|
Log4j 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |