Class JsonlLogWriter
java.lang.Object
org.jpos.util.BaseLogEventWriter
org.jpos.util.JsonlLogWriter
- All Implemented Interfaces:
Configurable, LogEventWriter
JSONL (one JSON object per line) LogEventWriter with built-in PCI protection.
When serializing ISOMsg objects in LogEvent payloads, sensitive fields are
masked or wiped inline — no upstream ProtectedLogListener required.
Configuration properties (same convention as ProtectedLogListener):
protect— space-separated field numbers to mask viaISOUtil.protect(String)(default:"2")wipe— space-separated field numbers to replace with [WIPED] (default:"35 45 48 52 55")
Output is suitable for jq, Filebeat, and Elasticsearch ingestion.
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidConfigures this object with the suppliedConfiguration.voidWrites a log event to the underlying output.Methods inherited from class BaseLogEventWriter
close, setPrintStreamModifier and TypeMethodDescriptionvoidclose()Closes the writer and releases any underlying resources.voidSets the print stream used for output.
-
Constructor Details
-
JsonlLogWriter
public JsonlLogWriter()Default constructor.
-
-
Method Details
-
setConfiguration
Description copied from interface:ConfigurableConfigures this object with the suppliedConfiguration.- Specified by:
setConfigurationin interfaceConfigurable- Parameters:
cfg- Configuration object- Throws:
ConfigurationException- if the configuration is invalid
-
write
Description copied from interface:LogEventWriterWrites a log event to the underlying output.- Specified by:
writein interfaceLogEventWriter- Overrides:
writein classBaseLogEventWriter- Parameters:
ev- the log event to write
-