public class MappingLogEventWriter extends BaseLogEventWriter implements XmlConfigurable
<writer class="org.jpos.util.MappingLogEventWriter">
<event-mapper class="...">
<property.... />
</event-mapper>
<event-mapper class="..."/>
<output-mapper class="...">
<property.... />
</output-mapper>
<output-mapper class="..."/>
</writer>
| Constructor and Description |
|---|
MappingLogEventWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
configureCaptureStreams() |
protected void |
configureEventMappers(org.jdom2.Element e) |
protected void |
configureOutputMappers(org.jdom2.Element e) |
protected void |
delegateWriteToSuper(LogEvent ev)
This method exists and is used so that we can verify the order of instructions
during a call to write in unit tests.
|
protected LogEvent |
mapEvents(LogEvent ev) |
protected byte[] |
mapOutput(byte[] output) |
void |
setConfiguration(org.jdom2.Element e) |
void |
setPrintStream(java.io.PrintStream p) |
void |
write(LogEvent ev) |
protected void |
writeToCaptureStream(LogEvent ev)
Write to capture print stream when defined.
|
public void setPrintStream(java.io.PrintStream p)
setPrintStream in interface LogEventWritersetPrintStream in class BaseLogEventWriterpublic void close()
close in interface LogEventWriterclose in class BaseLogEventWriterpublic void write(LogEvent ev)
write in interface LogEventWriterwrite in class BaseLogEventWriterpublic void setConfiguration(org.jdom2.Element e)
throws ConfigurationException
setConfiguration in interface XmlConfigurablee - Configuration elementConfigurationException - on errorprotected void configureCaptureStreams()
protected void configureEventMappers(org.jdom2.Element e)
throws ConfigurationException
ConfigurationExceptionprotected void configureOutputMappers(org.jdom2.Element e)
throws ConfigurationException
ConfigurationExceptionprotected byte[] mapOutput(byte[] output)
protected void delegateWriteToSuper(LogEvent ev)
ev - LogEvent to write.protected void writeToCaptureStream(LogEvent ev)
ev - LogEvent to write.