Class LoggingAuditSink

java.lang.Object
com.svenruppert.jsentinel.audit.LoggingAuditSink
All Implemented Interfaces:
AuditSink

public final class LoggingAuditSink extends Object implements AuditSink
AuditSink that writes a single Logger line per event at INFO level. Never throws.

The line format is intentionally compact and stable so it can be grepped from a deployment log: AUDIT type=… field=value ….

  • Constructor Details

    • LoggingAuditSink

      public LoggingAuditSink()
    • LoggingAuditSink

      public LoggingAuditSink(Logger logger)
  • Method Details

    • accept

      public void accept(AuditEvent event)
      Description copied from interface: AuditSink
      Records the given event.
      Specified by:
      accept in interface AuditSink
      Parameters:
      event - non-null event