public class BasicEventLogger extends Object implements EventLogger
| Constructor and Description |
|---|
BasicEventLogger() |
| Modifier and Type | Method and 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 level
|
EventLogger |
scope(String scope)
Sets the scope of this event log, e.g.
|
EventLogger |
who(String who)
Sets a security name for this event log.
|
public EventLogger scope(String scope)
EventLoggerscope in interface EventLoggerscope - a scopepublic EventLogger context(String context)
EventLoggercontext in interface EventLoggercontext - the name of the contextpublic EventLogger detail(String detail)
EventLoggerdetail in interface EventLoggerdetail - the event log detailpublic EventLogger who(String who)
EventLoggerwho in interface EventLoggerwho - the security namepublic void log(EventLogLevel level, EventLogCategory category, String message)
EventLoggerlog in interface EventLoggerlevel - the severity level of the eventmessage - the message to logpublic List<EventLog> getEvents(Instant start, int count, Optional<EventLogCategory> category, Optional<EventLogLevel> level)
getEvents in interface EventLoggerstart - the instant from which to retrieve the logscount - the number of logs to retrievecategory - an optional category filterlevel - an optional level filterEventLogsCopyright © 2024 JBoss, a division of Red Hat. All rights reserved.