public class ProtectedLogListener extends java.lang.Object implements LogListener, Configurable
<logger name="Q2">
<log-listener class="org.jpos.util.SimpleLogListener"/>
<log-listener class="org.jpos.util.ProtectedLogListener">
<property name="protect" value="2 35 45 55" />
<property name="wipe" value="48" />
</log-listener>
<log-listener class="org.jpos.util.RotateLogListener">
<property name="file" value="log/q2..log" />
<property name="window" value="86400" />
<property name="copies" value="5" />
<property name="maxsize" value="1000000" />
</log-listener>
</logger>
Order is important. In the previous example SimpleLogListener
will dump unprotected LogEvents while RotateLogListener will
dump protected ones (for selected fields)Configurable
Modifier and Type | Field and Description |
---|---|
static byte[] |
BINARY_WIPED |
static java.lang.String |
WIPED |
Constructor and Description |
---|
ProtectedLogListener() |
Modifier and Type | Method and Description |
---|---|
LogEvent |
log(LogEvent ev) |
void |
setConfiguration(Configuration cfg)
Configure this ProtectedLogListener
Properties: [protect] blank separated list of fields to be protected [wipe] blank separated list of fields to be wiped |
public static final java.lang.String WIPED
public static final byte[] BINARY_WIPED
public void setConfiguration(Configuration cfg) throws ConfigurationException
setConfiguration
in interface Configurable
cfg
- ConfigurationConfigurationException
public LogEvent log(LogEvent ev)
log
in interface LogListener