|
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.SimpleLayout
SimpleLayout consists of the priority of the log statement, followed by " - " and then the log message itself. For example,
DEBUG - Hello world
PatternLayout
offers a much more powerful alternative.
Fields inherited from class org.apache.log4j.Layout |
LINE_SEP, LINE_SEP_LEN |
Constructor Summary | |
SimpleLayout()
|
Method Summary | |
void |
activateOptions()
Activate the options that were previously set with calls to option setters. |
String |
format(LoggingEvent event)
Returns the log statement in a format consisting of the priority , followed by " - " and then the
message . |
String[] |
getOptionStrings()
Return list of strings that the OptionHandler instance recognizes. |
boolean |
ignoresThrowable()
The SimpleLayout does not handle the throwable contained within LoggingEvents . |
void |
setOption(String option,
String value)
Set option to value . |
Methods inherited from class org.apache.log4j.Layout |
getContentType, getFooter, getHeader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleLayout()
Method Detail |
public String[] getOptionStrings()
OptionHandler
public void setOption(String option, String value)
OptionHandler
option
to value
.
The handling of each option depends on the OptionHandler
instance. Some options may become active immediately whereas
other may be activated only when OptionHandler.activateOptions()
is
called.
public void activateOptions()
OptionHandler
This allows to defer activiation of the options until all options have been set. This is required for components which have related options that remain ambigous until all are set.
For example, the FileAppender has the
File
and
Append
options both of which are
ambigous until the other is also set.
public String format(LoggingEvent event)
priority
, followed by " - " and then the
message
. For example, INFO - "A message"
The category
parameter is ignored.
format
in class Layout
public boolean ignoresThrowable()
LoggingEvents
. Thus, it returns
true
.ignoresThrowable
in class Layout
|
Log4j 1.1.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |