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.
  • Constructor Details

  • Method Details

    • now

      public long 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

      public @Nullable System.Logger.Level levelOrNull(String loggerName)
      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 a LogwoodService.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. Reads logging.keyvalues.mode; absent means LogwoodService.KeyValuesMode.FLAT. Names are case-insensitive; false means none and true means flat.
      Returns:
      output mode.
    • propertyOrNull

      public @Nullable String propertyOrNull(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.