Class TcpLogEventObserver

  • All Implemented Interfaces:
    LogEventObserver

    public class TcpLogEventObserver
    extends AbstractBatchingLogEventObserver
    Writes LogEvents to a TCP address. To avoid exceptions and network slowness interrupting main process flow, this observer batches the message sending with the same mechanism as AbstractBatchingLogEventObserver. This class has been optimized for writing to an ELK installation

    Sample configuration (used with Logstash)

     observer.tcp=TcpLogEventObserver
     observer.tcp.address=example.com:8888
     observer.tcp.formatter=JsonLogEventFormatter
     observer.tcp.formatter.excludedMdcKeys=test