public class DecoratedEventLogger extends Object implements EventLogger
Modifier and Type | Field and Description |
---|---|
protected String |
context |
protected String |
detail |
protected String |
scope |
protected String |
who |
Modifier | Constructor and Description |
---|---|
protected |
DecoratedEventLogger(EventLogger delegate) |
Modifier and Type | Method and Description |
---|---|
protected void |
addLogsToBuilder(StringBuilder sb) |
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)
Retrieves the event logs from the cluster within the specified range
|
void |
log(EventLogLevel level,
EventLogCategory category,
String message)
Logs a message to the event log with the specified level
|
EventLogger |
scope(Address scope)
Sets a node address as the scope of this event log
|
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.
|
protected String detail
protected String context
protected String scope
protected String who
protected DecoratedEventLogger(EventLogger delegate)
public void log(EventLogLevel level, EventLogCategory category, String message)
EventLogger
log
in interface EventLogger
level
- the severity level of the eventmessage
- the message to logprotected void addLogsToBuilder(StringBuilder sb)
public EventLogger who(String who)
EventLogger
who
in interface EventLogger
who
- the security namepublic EventLogger scope(String scope)
EventLogger
scope
in interface EventLogger
scope
- a scopepublic EventLogger scope(Address scope)
EventLogger
scope
in interface EventLogger
scope
- the address of the nodepublic 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 List<EventLog> getEvents(Instant start, int count, Optional<EventLogCategory> category, Optional<EventLogLevel> level)
EventLogger
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.