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)
EventLogger
scope
in interface EventLogger
scope
- a scopepublic EventLogger context(String context)
EventLogger
context
in interface EventLogger
context
- the name of the contextpublic EventLogger detail(String detail)
EventLogger
detail
in interface EventLogger
detail
- the event log detailpublic EventLogger who(String who)
EventLogger
who
in interface EventLogger
who
- the security namepublic void log(EventLogLevel level, EventLogCategory category, String message)
EventLogger
log
in interface EventLogger
level
- 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 EventLogger
start
- the instant from which to retrieve the logscount
- the number of logs to retrievecategory
- an optional category filterlevel
- an optional level filterEventLog
sCopyright © 2021 JBoss by Red Hat. All rights reserved.