public class

SimpleLayout

extends Layout
java.lang.Object
   ↳ org.apache.log4j.Layout
     ↳ org.apache.log4j.SimpleLayout

Class Overview

SimpleLayout consists of the level of the log statement, followed by " - " and then the log message itself. For example,

           DEBUG - Hello world
   

Summary

[Expand]
Inherited Fields
From class org.apache.log4j.Layout
Public Constructors
SimpleLayout()
Public Methods
void activateOptions()
String format(LoggingEvent event)
Returns the log statement in a format consisting of the level, followed by " - " and then the message.
boolean ignoresThrowable()
The SimpleLayout does not handle the throwable contained within LoggingEvents.
[Expand]
Inherited Methods
From class org.apache.log4j.Layout
From class java.lang.Object
From interface org.apache.log4j.spi.OptionHandler

Public Constructors

public SimpleLayout ()

Public Methods

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.

Returns
  • A byte array in SimpleLayout format.

public boolean ignoresThrowable ()

The SimpleLayout does not handle the throwable contained within LoggingEvents. Thus, it returns true.