org.apache.log4j

Class SimpleLayout

public class SimpleLayout extends Layout

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

Since: version 0.7.0

{@link PatternLayout} offers a much more powerful alternative.

Author: Ceki Gülcü

Constructor Summary
SimpleLayout()
Method Summary
voidactivateOptions()
Stringformat(LoggingEvent event)
Returns the log statement in a format consisting of the level, followed by " - " and then the message.
booleanignoresThrowable()
The SimpleLayout does not handle the throwable contained within {@link LoggingEvent LoggingEvents}.

Constructor Detail

SimpleLayout

public SimpleLayout()

Method Detail

activateOptions

public void activateOptions()

format

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.

ignoresThrowable

public boolean ignoresThrowable()
The SimpleLayout does not handle the throwable contained within {@link LoggingEvent LoggingEvents}. Thus, it returns true.

Since: version 0.8.4

Copyright 2000-2005 Apache Software Foundation.