Class BasicEventLogger
- java.lang.Object
-
- org.infinispan.util.logging.events.impl.BasicEventLogger
-
- All Implemented Interfaces:
EventLogger
public class BasicEventLogger extends Object implements EventLogger
BasicEventLogger. An event logger which doesn't do anything aside from sending events to the logger- Since:
- 8.2
- Author:
- Tristan Tarrant
-
-
Constructor Summary
Constructors Constructor Description BasicEventLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventLogger
context(String context)
Sets a context of this event log.EventLogger
detail(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)
The basic event logger doesn't collect anything.void
log(EventLogLevel level, EventLogCategory category, String message)
Logs a message to the event log with the specified levelEventLogger
scope(String scope)
Sets the scope of this event log, e.g.EventLogger
who(String who)
Sets a security name for this event log.
-
-
-
Method Detail
-
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 interfaceEventLogger
- Parameters:
scope
- a scope- 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 interfaceEventLogger
- 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 interfaceEventLogger
- Parameters:
detail
- the event log detail- Returns:
- the event logger
-
who
public EventLogger who(String who)
Description copied from interface:EventLogger
Sets a security name for this event log.- Specified by:
who
in interfaceEventLogger
- Parameters:
who
- the security name- Returns:
- the event logger
-
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 interfaceEventLogger
- Parameters:
level
- the severity level of the eventmessage
- the message to log
-
getEvents
public List<EventLog> getEvents(Instant start, int count, Optional<EventLogCategory> category, Optional<EventLogLevel> level)
The basic event logger doesn't collect anything.- Specified by:
getEvents
in 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
EventLog
s
-
-