Save This Page
Home » apache-log4j-1.2.15 » org.apache » log4j » [javadoc | source]
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     
Fields inherited from org.apache.log4j.Layout:
LINE_SEP,  LINE_SEP_LEN
Constructor:
 public SimpleLayout() 
Method from org.apache.log4j.SimpleLayout Summary:
activateOptions,   format,   ignoresThrowable
Methods from org.apache.log4j.Layout:
format,   getContentType,   getFooter,   getHeader,   ignoresThrowable
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.log4j.SimpleLayout Detail:
 public  void activateOptions() 
 public String format(LoggingEvent event) 
    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() 
    The SimpleLayout does not handle the throwable contained within LoggingEvents . Thus, it returns true.