Class AuditLogger


  • @Component
    public class AuditLogger
    extends Object
    • Constructor Detail

      • AuditLogger

        @Autowired
        public AuditLogger​(LoggingProperties loggingProperties,
                           org.springframework.boot.info.BuildProperties buildProperties)
    • Method Detail

      • logMessage

        public static void logMessage​(org.slf4j.event.Level level,
                                      MessageAuditLogEntry.Builder entryBuilder)
        Log the handling of a Protobuf message by a service call.
        Parameters:
        entryBuilder - with all fields set except instance.
      • logAction

        public static void logAction​(org.slf4j.event.Level level,
                                     String action,
                                     LogResource.ResourceType resourceType,
                                     String resourceId)
        Log an action being taken on a specific resource
        Parameters:
        level - describing the severity of the log.
        action - name of the action being taken on specific resource.
        resourceType - the type of resource being logged.
        resourceId - resource specific identifier identifing the instance of the resource.
      • logTransition

        public static void logTransition​(org.slf4j.event.Level level,
                                         String status,
                                         LogResource.ResourceType resourceType,
                                         String resourceId)
        Log a transition in state/status in a specific resource.
        Parameters:
        level - describing the severity of the log.
        status - name of end status which the resource transition to.
        resourceType - the type of resource being logged.
        resourceId - resource specific identifier identifing the instance of the resource.