Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1747

Allow subclasses of LoggerContext to customize new Logger instances

    XMLWordPrintable

Details

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • logback-classic
    • None

    Description

      I've a use case where I am adapting Logback to work with a legacy product's proprietary log mechanism. I did this by creating a wrapper class around a Logger. But there is no hook to programmatically touch the Logger instances at creation-time.

      I submitted a pull request #635 (https://github.com/qos-ch/logback/pull/635) that addresses this by simply adding a method to LoggerContext that is invoked immediately after Logger.createChildByName(), which by default is a no-op but can be implemented by custom contexts.

       

      Attachments

        Activity

          People

            logback-dev Logback dev list
            rsand Richard Sand
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: