public class LoggingEventConsumer extends Object implements Consumer<Event>
Events
and logs them per configuration.
This consumer is intended to be attached per default and performs convenient logging throughout the system. It tries to detect settings and loggers in a best-effort way but can always be swapped out or changed to implement custom functionality.
If SLF4J is detected on the classpath it will be used, otherwise it will fall back to java.com.couchbase.client.test.util.logging or the console depending on the configuration.
Modifier and Type | Class and Description |
---|---|
static interface |
LoggingEventConsumer.Logger
Generic logger interface.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Event event) |
static LoggingEventConsumer |
create()
Creates a new
LoggingEventConsumer with all defaults. |
static LoggingEventConsumer |
create(LoggerConfig loggerConfig) |
public static LoggingEventConsumer create()
LoggingEventConsumer
with all defaults.LoggingEventConsumer
.public static LoggingEventConsumer create(LoggerConfig loggerConfig)
Copyright © 2020 Couchbase, Inc.. All rights reserved.