Package com.couchbase.client.core.cnc
Class LoggingEventConsumer
java.lang.Object
com.couchbase.client.core.cnc.LoggingEventConsumer
public class LoggingEventConsumer extends Object implements Consumer<Event>
Consumes
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.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLoggingEventConsumer.LoggerGeneric logger interface. -
Method Summary
Modifier and Type Method Description voidaccept(Event event)static LoggingEventConsumercreate()Creates a newLoggingEventConsumerwith all defaults.static LoggingEventConsumercreate(LoggerConfig loggerConfig)
-
Method Details
-
create
Creates a newLoggingEventConsumerwith all defaults.- Returns:
- a
LoggingEventConsumer.
-
create
-
accept
-