chapters.migrationFromLog4j
Class TrivialLog4jLayout

java.lang.Object
  extended by org.apache.log4j.Layout
      extended by chapters.migrationFromLog4j.TrivialLog4jLayout
All Implemented Interfaces:
org.apache.log4j.spi.OptionHandler

public class TrivialLog4jLayout
extends org.apache.log4j.Layout

A very simple log4j layout which formats a logging event by returning the message contained therein.

Author:
Ceki Gülcü

Field Summary
 
Fields inherited from class org.apache.log4j.Layout
LINE_SEP, LINE_SEP_LEN
 
Constructor Summary
TrivialLog4jLayout()
           
 
Method Summary
 void activateOptions()
           
 String format(org.apache.log4j.spi.LoggingEvent loggingEvent)
           
 boolean ignoresThrowable()
           
 
Methods inherited from class org.apache.log4j.Layout
getContentType, getFooter, getHeader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrivialLog4jLayout

public TrivialLog4jLayout()
Method Detail

activateOptions

public void activateOptions()
Specified by:
activateOptions in interface org.apache.log4j.spi.OptionHandler
Specified by:
activateOptions in class org.apache.log4j.Layout

format

public String format(org.apache.log4j.spi.LoggingEvent loggingEvent)
Specified by:
format in class org.apache.log4j.Layout

ignoresThrowable

public boolean ignoresThrowable()
Specified by:
ignoresThrowable in class org.apache.log4j.Layout


Copyright © 2005-2013 QOS.ch. All Rights Reserved.