|
Log4j 1.3alpha-1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.Layout | +--org.apache.log4j.SimpleLayout
SimpleLayout consists of the level of the log statement, followed by " - " and then the log message itself. For example,
DEBUG - Hello world
PatternLayout
offers a much more powerful alternative.
Field Summary |
Fields inherited from class org.apache.log4j.Layout |
charArrayWriter, ignoresThrowable, LINE_SEP, LINE_SEP_LEN |
Constructor Summary | |
SimpleLayout()
|
Method Summary | |
void |
activateOptions()
Activate the options that were previously set with calls to option setters. |
void |
format(java.io.Writer output,
LoggingEvent event)
Writes the log statement in a format consisting of the level , followed by " - " and then the
message . |
Methods inherited from class org.apache.log4j.Layout |
format, getContentType, getFooter, getHeader, ignoresThrowable, setFooter, setHeader, setIgnoresThrowable |
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 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 void format(java.io.Writer output, LoggingEvent event) throws java.io.IOException
level
, followed by " - " and then the
message
. For example, INFO - "A message"
The category
parameter is ignored.
format
in class Layout
event
- The LoggingEvent to format and writeoutput
- The java.io.Writer to write to
java.io.IOException
|
Log4j 1.3alpha-1 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |