public interface EventLogger
Note that a event source is an arbitrary string used to differentiate logging events.
For example a web access event may have an even source of web-access.
| Modifier and Type | Method and Description |
|---|---|
static EventLogger |
createAsyncLogger(String eventSource,
EventWriter writer,
Executor executor)
Creates a new asynchronous event logger.
|
static EventLogger |
createAsyncLogger(String eventSource,
Executor executor)
|
static EventLogger |
createLogger(String eventSource)
|
static EventLogger |
createLogger(String eventSource,
EventWriter writer)
Creates a new event logger.
|
String |
getEventSource()
Returns the source of event this logger is logging.
|
EventLogger |
log(Map<String,Object> event)
Logs the event.
|
EventLogger |
log(Supplier<Map<String,Object>> event)
Logs the event.
|
static EventLogger createLogger(String eventSource)
eventSource - the identifier for the source of the event this logger is used forstatic EventLogger createLogger(String eventSource, EventWriter writer)
eventSource - the identifier for the source of the event this logger is used forwriter - the writer this logger will write tostatic EventLogger createAsyncLogger(String eventSource, Executor executor)
eventSource - the identifier for the source of the event this logger is used forexecutor - the executor to execute the threads instatic EventLogger createAsyncLogger(String eventSource, EventWriter writer, Executor executor)
eventSource - the identifier for the source of the event this logger is used forwriter - the writer this logger will write toexecutor - the executor to execute the threads inEventLogger log(Map<String,Object> event)
event - the event to logEventLogger log(Supplier<Map<String,Object>> event)
The supplier can lazily load the data. Note that in the cases of an asynchronous logger the data will be retrieved in a different thread.
event - the event to logString getEventSource()
Copyright © 2020 JBoss by Red Hat. All rights reserved.