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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      EventBuilder<?> eventBuilder​(java.lang.String typeId)
      Returns an instance of the EventBuilder interface.
      void log​(AuditableEvent auditableEvent)
      Logs given event.
      void log​(java.lang.String eventTypeId, Level level, java.lang.String message)
      Creates and logs a simple parameterless message at the given level.
      void log​(java.lang.String eventTypeId, Level level, java.lang.String message, java.lang.Throwable thrown)
      Creates and logs a simple parameterless message with an associated throwable at the given level.
    • Method Detail

      • log

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

        void log​(java.lang.String eventTypeId,
                 Level level,
                 java.lang.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​(java.lang.String eventTypeId,
                 Level level,
                 java.lang.String message,
                 java.lang.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​(java.lang.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