Class LogwoodService.LogwoodConfig
java.lang.Object
io.jstach.logwood.spi.LogwoodService.LogwoodConfig
- All Implemented Interfaces:
LogwoodService
- Enclosing interface:
LogwoodService
public static non-sealed class LogwoodService.LogwoodConfig
extends Object
implements LogwoodService
Configuration independent of context collection. Levels are resolved once per
logger through dotted ancestors and the empty root name; null inherits.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceOptional MDC storage, independent of SLF4J.Nested classes/interfaces inherited from interface LogwoodService
LogwoodService.KeyValuesMode, LogwoodService.KeyValuesProvider, LogwoodService.LogwoodConfigModifier and TypeInterfaceDescriptionstatic enumHow application key values are emitted; neither format creates a nested object.static classPushes context synchronously without invoking a logging facade.static classConfiguration independent of context collection. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable LogwoodService.LogwoodConfig.MDCAdapterCreates the adapter only when SLF4J initializes, never for System.Logger.Key-value output for both LTSV and JSONL, resolved once at initialization.@Nullable System.Logger.LevellevelOrNull(String loggerName) Returns a threshold, or null to inherit.longnow()Current epoch milliseconds, defaulting to the system wall clock.@Nullable StringpropertyOrNull(String key) Reads logging.level, logging.level.name, logging.journald, logging.format, logging.keyvalues.mode, logging.ltsv.stacktrace, and logging.ltsv.columns; null means absent.
-
Constructor Details
-
LogwoodConfig
public LogwoodConfig()
-
-
Method Details
-
now
Current epoch milliseconds, defaulting to the system wall clock. Called once for each enabled event outside journald mode. Overrides must be thread-safe. Failure diagnostics use the system clock independently of this callback.- Returns:
- milliseconds since 1970-01-01T00:00:00Z.
-
levelOrNull
Returns a threshold, or null to inherit. Defaults to logging.level[.name]. -
createMDCAdapter
Creates the adapter only when SLF4J initializes, never for System.Logger. To include MDC in records, push its entries from aLogwoodService.KeyValuesProvider. The default retains no context: null selects the no-op bridge. -
keyValuesMode
Key-value output for both LTSV and JSONL, resolved once at initialization. Readslogging.keyvalues.mode; absent meansLogwoodService.KeyValuesMode.FLAT. Names are case-insensitive;falsemeans none andtruemeans flat.- Returns:
- output mode.
-
propertyOrNull
Reads logging.level, logging.level.name, logging.journald, logging.format, logging.keyvalues.mode, logging.ltsv.stacktrace, and logging.ltsv.columns; null means absent.
-