Uploaded image for project: 'SLF4J'
  1. SLF4J
  2. SLF4J-160

Better introspection into logging setup

    Details

    • Type: Improvement
    • Status: Resolved
    • Resolution: Incomplete
    • Affects Version/s: 1.5.x
    • Fix Version/s: None
    • Component/s: Implementations
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      I'd like to

      • have a way to enumerate all SLF4J loggers configured, and
      • get an event whenever any SLF4J logger has its configuration changed.

      USE CASE:

      I could improve SLF4JBridgeHandler with that.

      I have a situation where I need to set j.u.l. logging to ALL for some loggers to get the information I want, and WARN for other loggers to keep performance to acceptable levels.
      Currently, I'm forced to configure both slf4j and j.u.l. This is error-prone because I have to keep redundant logging configurations, and because the logging levels do not map 1:1.

      With the enumeration, I could initialize a j.u.l. logger for every configured slf4j logger, at a compatible logging level.
      With the events, I could keep the j.u.l. configuration in sync with the slf4j configuration.

      HELPING WITH THE WORK

      I can contribute the code, but I can't decide where in SLF4J's architecture it should go.

        Attachments

          Activity

            People

            • Assignee:
              slf4j-dev SLF4J developers list
              Reporter:
              jo@durchholz.org Joachim Durchholz
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: