Interface AuditlogService


public interface AuditlogService
Service for logging AuditableEvents. Standard events have their type identifiers defined as constants in the AuditlogTypeIds class.

The invocations on this interface may be done in performance sensitive places so the implementation should not do anything too heavy.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an instance of the EventBuilder interface.
    void
    log(AuditableEvent auditableEvent)
    Logs given event.
    void
    log(String eventTypeId, Level level, String message)
    Creates and logs a simple parameterless message at the given level.
    void
    log(String eventTypeId, Level level, String message, Throwable thrown)
    Creates and logs a simple parameterless message with an associated throwable at the given level.
  • Method Details

    • log

      void log(AuditableEvent auditableEvent)
      Logs given event.
      Parameters:
      auditableEvent - the event to be logged.
    • log

      void log(String eventTypeId, Level level, String message)
      Creates and logs a simple parameterless message at the given level.
      Parameters:
      level - the log level
      eventTypeId - unique identifier of the event type
      message - the message to log
    • log

      void log(String eventTypeId, Level level, String message, Throwable thrown)
      Creates and logs a simple parameterless message with an associated throwable at the given level.
      Parameters:
      message - the message to log
      eventTypeId - unique identifier of the event type
      thrown - the Throwable associated to the message
    • eventBuilder

      EventBuilder<?> eventBuilder(String typeId)
      Returns an instance of the EventBuilder interface. It can be performance optimized (e.g. when Event Audit logging is disabled). The EventBuilder allows creating auditable events by using simple fluent API.
      Parameters:
      typeId - Unique identifier for given type of auditable event.
      Returns:
      EventBuilder instance