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 LogEventWriter
setPrintStream
in class BaseLogEventWriter
public void close()
close
in interface LogEventWriter
close
in class BaseLogEventWriter
public void write(LogEvent ev)
write
in interface LogEventWriter
write
in class BaseLogEventWriter
public void setConfiguration(org.jdom2.Element e) throws ConfigurationException
setConfiguration
in interface XmlConfigurable
e
- Configuration elementConfigurationException
- on errorprotected void configureCaptureStreams()
protected void configureEventMappers(org.jdom2.Element e) throws ConfigurationException
ConfigurationException
protected void configureOutputMappers(org.jdom2.Element e) throws ConfigurationException
ConfigurationException
protected byte[] mapOutput(byte[] output)
protected void delegateWriteToSuper(LogEvent ev)
ev
- LogEvent to write.protected void writeToCaptureStream(LogEvent ev)
ev
- LogEvent to write.