Class DecoratedEventLogger

  • All Implemented Interfaces:
    EventLogger

    public class DecoratedEventLogger
    extends Object
    implements EventLogger
    DecoratedEventLogger. Provides a way to decorate an EventLog with additional information.
    Since:
    8.2
    Author:
    Tristan Tarrant
    • Constructor Detail

      • DecoratedEventLogger

        protected DecoratedEventLogger​(EventLogger delegate)
    • Method Detail

      • log

        public void log​(EventLogLevel level,
                        EventLogCategory category,
                        String message)
        Description copied from interface: EventLogger
        Logs a message to the event log with the specified level
        Specified by:
        log in interface EventLogger
        Parameters:
        level - the severity level of the event
        message - the message to log
      • who

        public EventLogger who​(String who)
        Description copied from interface: EventLogger
        Sets a security name for this event log.
        Specified by:
        who in interface EventLogger
        Parameters:
        who - the security name
        Returns:
        the event logger
      • scope

        public EventLogger scope​(String scope)
        Description copied from interface: EventLogger
        Sets the scope of this event log, e.g. a node address. This should be used for events which reference a single node in the cluster
        Specified by:
        scope in interface EventLogger
        Parameters:
        scope - a scope
        Returns:
        the event logger
      • scope

        public EventLogger scope​(Address scope)
        Description copied from interface: EventLogger
        Sets a node address as the scope of this event log
        Specified by:
        scope in interface EventLogger
        Parameters:
        scope - the address of the node
        Returns:
        the event logger
      • context

        public EventLogger context​(String context)
        Description copied from interface: EventLogger
        Sets a context of this event log.
        Specified by:
        context in interface EventLogger
        Parameters:
        context - the name of the context
        Returns:
        the event logger
      • detail

        public EventLogger detail​(String detail)
        Description copied from interface: EventLogger
        Sets a detail for this event log which could include additional information.
        Specified by:
        detail in interface EventLogger
        Parameters:
        detail - the event log detail
        Returns:
        the event logger
      • getEvents

        public List<EventLog> getEvents​(Instant start,
                                        int count,
                                        Optional<EventLogCategory> category,
                                        Optional<EventLogLevel> level)
        Description copied from interface: EventLogger
        Retrieves the event logs from the cluster within the specified range
        Specified by:
        getEvents in interface EventLogger
        Parameters:
        start - the instant from which to retrieve the logs
        count - the number of logs to retrieve
        category - an optional category filter
        level - an optional level filter
        Returns:
        a list of EventLogs