Class DecoratedEventLogger
- java.lang.Object
-
- org.infinispan.util.logging.events.impl.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 Summary
Constructors Modifier Constructor Description protectedDecoratedEventLogger(EventLogger delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddLogsToBuilder(StringBuilder sb)EventLoggercontext(String context)Sets a context of this event log.EventLoggerdetail(String detail)Sets a detail for this event log which could include additional information.List<EventLog>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 levelEventLoggerscope(String scope)Sets the scope of this event log, e.g.EventLoggerscope(Address scope)Sets a node address as the scope of this event logEventLoggerwho(String who)Sets a security name for this event log.
-
-
-
Constructor Detail
-
DecoratedEventLogger
protected DecoratedEventLogger(EventLogger delegate)
-
-
Method Detail
-
log
public void log(EventLogLevel level, EventLogCategory category, String message)
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
protected void addLogsToBuilder(StringBuilder sb)
-
who
public EventLogger who(String 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
public EventLogger scope(String 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
public EventLogger scope(Address 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
public EventLogger context(String 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
public EventLogger detail(String 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
-
-