org.apache.log4j
public class: SimpleLayout [javadoc |
source]
java.lang.Object
org.apache.log4j.Layout
org.apache.log4j.SimpleLayout
All Implemented Interfaces:
OptionHandler
SimpleLayout consists of the level of the log statement,
followed by " - " and then the log message itself. For example,
DEBUG - Hello world
| Field Summary |
|---|
| StringBuffer | sbuf | |
| Method from org.apache.log4j.SimpleLayout Detail: |
public void activateOptions() {
}
|
public String format(LoggingEvent event) {
sbuf.setLength(0);
sbuf.append(event.getLevel().toString());
sbuf.append(" - ");
sbuf.append(event.getRenderedMessage());
sbuf.append(LINE_SEP);
return sbuf.toString();
}
Returns the log statement in a format consisting of the
level, followed by " - " and then the
message. For example, INFO - "A message"
The category parameter is ignored.
|
public boolean ignoresThrowable() {
return true;
}
The SimpleLayout does not handle the throwable contained within
LoggingEvents . Thus, it returns
true. |