public interface LDLogAdapter
Any LaunchDarkly library that can generate log output through com.launchDarkly.logging
has a configuration option of type LDLogAdapter
, which defines the implementation
details of what to do with the log output. Built-in basic implementations are available
through the Logs
factory class, and adapters that delegate to other logging
frameworks can be provided by other LaunchDarkly packages or by the application.
The basic model is that whatever component will be writing to the logs will define at least
one name for an output channel. The adapter's newChannel(String)
method
takes a name and returns a low-level LDLogAdapter.Channel
implementation that accepts
log messages for any LDLogLevel
; this is wrapped in the standard LDLogger
class, which is what the rest of the LaunchDarkly library code interacts with.
Applications should not need to interact directly with LDLogAdapter
, beyond the
initial configuration step of choosing which one to use.
Modifier and Type | Interface and Description |
---|---|
static interface |
LDLogAdapter.Channel
The underlying implementation object used by some
LDLogger instance. |
static interface |
LDLogAdapter.IsConfiguredExternally
Marker interface indicating that this adapter is for an external framework that has its
own configuration mechanism.
|
Modifier and Type | Method and Description |
---|---|
LDLogAdapter.Channel |
newChannel(java.lang.String name)
The logger calls this method to obtain a named output channel.
|
LDLogAdapter.Channel newChannel(java.lang.String name)
The name will be included in all log output for this channel. Channels are meant to be
retained and reused by the components they belong to, so the LDLogAdapter
does
not need to cache them.
name
- an identifying nameLDLogAdapter.Channel