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

add a context listener that automatically configures JMX

    XMLWordPrintable

Details

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • logback-classic
    • None

    Description

      Setting up logback JMX for a web application requires a bit too many manual steps. It is not enough to simply add <jmxConfigurator /> to the configuration file. You should also set the context path but often you can't know that in advance. In addition you still need to write custom code to prevent memory leaks. These issues could all be addressed by a custom context listener.

      <listener>
      <listener-class>ch.qos.logback.classic.selector.servlet.JmxEnabler</listener-class>
      </listener>

      Code attached.

      Attachments

        Activity

          People

            ceki Ceki Gülcü
            marschall Philippe Marschall
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: