- All Implemented Interfaces:
- org.apache.log4j.spi.OptionHandler
public class AuditMessageLayout
extends org.apache.log4j.PatternLayout
Format an audit logger message according to the given object and the defined ConversionPattern.
ConversionPattern should include a %m{sub-pattern} element where sub-pattern will be evaluated
to include the desired properties of the message object.
log4j properties must point to this class and define the Conversion pattern e.g. as follows:
log4j.appender.audit.layout=org.posper.tpv.util.AuditMessageLayout
log4j.appender.audit.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss};%c{1};%m{%u,%d;%p}%n
sub-pattern example:
%u user
%p priceSell (gross?)
%d description
- Author:
- hans