public class LoggerConfig extends Object
LoggerConfig
allows to customize various aspects of the SDKs logging behavior.Modifier and Type | Class and Description |
---|---|
static class |
LoggerConfig.Builder |
static class |
LoggerConfig.Defaults |
Modifier and Type | Method and Description |
---|---|
static LoggerConfig.Builder |
builder()
Deprecated.
Instead of creating a new builder, please use
CoreEnvironment.Builder.loggerConfig(Consumer)
and configure the builder passed to the consumer.
Note: CoreEnvironment is a base class; you'll
probably call that method via a subclass named
ClusterEnvironment . |
LoggerFormatter |
consoleLoggerFormatter()
Deprecated.
SLF4J is used for all logging. Setting a custom console logger formatter has no effect.
|
LoggerConfig.Builder |
consoleLoggerFormatter(LoggerFormatter loggerFormatter)
Deprecated.
Please use
builder() instead. |
Level |
consoleLogLevel()
Deprecated.
SLF4J is used for all logging. Setting a console log level has no effect.
|
static LoggerConfig.Builder |
consoleLogLevel(Level consoleLogLevel)
Deprecated.
Please use
builder() instead. |
static LoggerConfig |
create()
Deprecated.
Instead, please use
CoreEnvironment.Builder.loggerConfig(Consumer)
and configure the builder passed to the consumer.
Note: CoreEnvironment is a base class; you'll
probably call that method via a subclass named
ClusterEnvironment . |
boolean |
diagnosticContextEnabled()
Returns true if the diagnostic context is enabled (disabled by default).
|
boolean |
disableSlf4J()
Deprecated.
SLF4J is used for all logging.
|
static LoggerConfig.Builder |
disableSlf4J(boolean disableSlf4J)
Deprecated.
Please use
builder() instead. |
static LoggerConfig.Builder |
enableDiagnosticContext(boolean diagnosticContextEnabled)
Deprecated.
Instead, please create a new builder with
builder() ,
and then call the non-static LoggerConfig.Builder.enableDiagnosticContext(boolean) method. |
boolean |
fallbackToConsole()
Deprecated.
SLF4J is used for all logging.
|
static LoggerConfig.Builder |
fallbackToConsole(boolean fallbackToConsole)
Deprecated.
Please use
builder() instead,
and configure your SLF4J binding to log to the console if desired. |
String |
loggerName()
Deprecated.
Setting a custom logger name has no effect.
|
static LoggerConfig.Builder |
loggerName(String loggerName)
Deprecated.
the logging infrastructure picks the logger name automatically now based on the event type
so it is easier to enable/disable logging or change the verbosity level for certain groups rather than having a
single universal logger name.
|
@Deprecated public static LoggerConfig.Builder builder()
CoreEnvironment.Builder.loggerConfig(Consumer)
and configure the builder passed to the consumer.
Note: CoreEnvironment is a base class; you'll
probably call that method via a subclass named
ClusterEnvironment
.LoggerConfig.Builder
which can be used to customize the different logging properties.@Deprecated public static LoggerConfig create()
CoreEnvironment.Builder.loggerConfig(Consumer)
and configure the builder passed to the consumer.
Note: CoreEnvironment is a base class; you'll
probably call that method via a subclass named
ClusterEnvironment
.LoggerConfig
with all the defaults (can be found in LoggerConfig.Defaults
).@Deprecated public static LoggerConfig.Builder fallbackToConsole(boolean fallbackToConsole)
builder()
instead,
and configure your SLF4J binding to log to the console if desired.SLF4J is used for all logging. If you wish to log to the console, please configure your SLF4J binding accordingly.
fallbackToConsole
- ignoredLoggerConfig.Builder
for chaining purposes.@Deprecated public static LoggerConfig.Builder disableSlf4J(boolean disableSlf4J)
builder()
instead.Deprecated because SLF4J is used for all logging, and cannot be disabled.
disableSlf4J
- ignoredLoggerConfig.Builder
for chaining purposes.@Deprecated public static LoggerConfig.Builder loggerName(String loggerName)
loggerName
- ignoredLoggerConfig.Builder
for chaining purposes.@Deprecated public static LoggerConfig.Builder enableDiagnosticContext(boolean diagnosticContextEnabled)
builder()
,
and then call the non-static LoggerConfig.Builder.enableDiagnosticContext(boolean)
method.enableDiagnosticContext
feature
set to the specified value.diagnosticContextEnabled
- if the diagnostic context should be enabled.LoggerConfig.Builder
for chaining purposes.@Deprecated public static LoggerConfig.Builder consoleLogLevel(Level consoleLogLevel)
builder()
instead.Deprecated because SLF4J is used for all logging. Please configure logging settings like this via your SLF4J binding.
consoleLogLevel
- ignoredLoggerConfig.Builder
for chaining purposes.@Deprecated public LoggerConfig.Builder consoleLoggerFormatter(LoggerFormatter loggerFormatter)
builder()
instead.Deprecated because SLF4J is used for all logging. Please configure this kind of logging setting via your SLF4J binding.
loggerFormatter
- ignoredLoggerConfig.Builder
for chaining purposes.@Deprecated public boolean fallbackToConsole()
@Deprecated public boolean disableSlf4J()
@Deprecated public String loggerName()
public boolean diagnosticContextEnabled()
@Deprecated public Level consoleLogLevel()
Level.INFO
.@Deprecated public LoggerFormatter consoleLoggerFormatter()
Copyright © 2024 Couchbase, Inc.. All rights reserved.