Class DecoratedEventLogger
java.lang.Object
org.infinispan.util.logging.events.impl.DecoratedEventLogger
- All Implemented Interfaces:
Listenable,EventLogger
DecoratedEventLogger. Provides a way to decorate an EventLog with additional information.
- Since:
- 8.2
- Author:
- Tristan Tarrant
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddListenerAsync(Object listener) Asynchronous version ofListenable.addListener(Object)protected voidSets a context of this event log.Sets a detail for this event log which could include additional information.getEvents(Instant start, int count, Optional<EventLogCategory> category, Optional<EventLogLevel> level) Retrieves the event logs from the cluster within the specified rangevoidlog(EventLogLevel level, EventLogCategory category, String message) Logs a message to the event log with the specified levelremoveListenerAsync(Object listener) Asynchronous version ofListenable.removeListener(Object)Sets the scope of this event log, e.g.Sets a node address as the scope of this event logSets a security name for this event log.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.util.logging.events.EventLogger
context, detail, error, fatal, info, warn, who, whoMethods inherited from interface org.infinispan.notifications.Listenable
addListener, removeListener
-
Field Details
-
detail
-
context
-
scope
-
who
-
-
Constructor Details
-
DecoratedEventLogger
-
-
Method Details
-
log
Description copied from interface:EventLoggerLogs a message to the event log with the specified level- Specified by:
login interfaceEventLogger- Parameters:
level- the severity level of the eventmessage- the message to log
-
addLogsToBuilder
-
who
Description copied from interface:EventLoggerSets a security name for this event log.- Specified by:
whoin interfaceEventLogger- Parameters:
who- the security name- Returns:
- the event logger
-
scope
Description copied from interface:EventLoggerSets 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:
scopein interfaceEventLogger- Parameters:
scope- a scope- Returns:
- the event logger
-
scope
Description copied from interface:EventLoggerSets a node address as the scope of this event log- Specified by:
scopein interfaceEventLogger- Parameters:
scope- the address of the node- Returns:
- the event logger
-
context
Description copied from interface:EventLoggerSets a context of this event log.- Specified by:
contextin interfaceEventLogger- Parameters:
context- the name of the context- Returns:
- the event logger
-
detail
Description copied from interface:EventLoggerSets a detail for this event log which could include additional information.- Specified by:
detailin interfaceEventLogger- 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:EventLoggerRetrieves the event logs from the cluster within the specified range- Specified by:
getEventsin interfaceEventLogger- Parameters:
start- the instant from which to retrieve the logscount- the number of logs to retrievecategory- an optional category filterlevel- an optional level filter- Returns:
- a list of
EventLogs
-
addListenerAsync
Description copied from interface:ListenableAsynchronous version ofListenable.addListener(Object)- Specified by:
addListenerAsyncin interfaceListenable- Parameters:
listener- listener to add, must not be null- Returns:
- CompletionStage that when complete the listener is fully installed
-
removeListenerAsync
Description copied from interface:ListenableAsynchronous version ofListenable.removeListener(Object)- Specified by:
removeListenerAsyncin interfaceListenable- Parameters:
listener- listener to remove, must not be null- Returns:
- CompletionStage that when complete the listener is fully removed
-