Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Commons Log 2.1.2
    • Fix Version/s: Commons Log 4.0.0
    • Component/s: Commons
    • Labels:
      None

      Description

      Rather than doing the work internally of writing log messages to disk, the internal log mechanism should use logback to handle the heavy lifting. This also adds the ability to add appenders and other nifty logback features.

        Issue Links

          Activity

          Hide
          Carl Hall added a comment -

          This should also include a way to register OSGi services that are consulted when logging out. This is aking to LogListeners used with LogService except should work in the logback appender area.

          Show
          Carl Hall added a comment - This should also include a way to register OSGi services that are consulted when logging out. This is aking to LogListeners used with LogService except should work in the logback appender area.
          Hide
          Chetan Mehrotra added a comment -

          Logback implementation for Sling

          Refer to

          https://github.com/chetanmeh/sling-logback for implementation details
          http://markmail.org/thread/66hrpdixaahvtyy5 - For discussion thread

          Show
          Chetan Mehrotra added a comment - Logback implementation for Sling Refer to https://github.com/chetanmeh/sling-logback for implementation details http://markmail.org/thread/66hrpdixaahvtyy5 - For discussion thread
          Hide
          Chetan Mehrotra added a comment -

          The patch includes testcases. The Github url provides details about various features supported.

          Currently the artifactid and package name are 'org.apache.sling.extensions.logback'. Probably it can use the current artifactid for commons log so that upgrades are simpler

          Show
          Chetan Mehrotra added a comment - The patch includes testcases. The Github url provides details about various features supported. Currently the artifactid and package name are 'org.apache.sling.extensions.logback'. Probably it can use the current artifactid for commons log so that upgrades are simpler
          Hide
          Felix Meschberger added a comment -

          Thanks for the code, very much appreciated. I will integrate it into the existing Commons Log module thereby replacing the old SLF4J implementation.

          Some questions, though, while scanning the source:

          • What is the source and license for prettify.js ?
          • src/main/resources has a rebel.xml file: Can we remove this ?
          • OsgiAction extends a private class: Is that really required ?

          As for JUL Bridging: I just copied the integration from the current Activator.

          Show
          Felix Meschberger added a comment - Thanks for the code, very much appreciated. I will integrate it into the existing Commons Log module thereby replacing the old SLF4J implementation. Some questions, though, while scanning the source: What is the source and license for prettify.js ? src/main/resources has a rebel.xml file: Can we remove this ? OsgiAction extends a private class: Is that really required ? As for JUL Bridging: I just copied the integration from the current Activator.
          Hide
          Chetan Mehrotra added a comment -

          Updating the patch with latest build. Following changes done

          – More testcases. Coverage at ~74%
          – Support for JUL, EventAdmin etc

          All details provided in https://github.com/chetanmeh/sling-logback/blob/master/README.md

          Show
          Chetan Mehrotra added a comment - Updating the patch with latest build. Following changes done – More testcases. Coverage at ~74% – Support for JUL, EventAdmin etc All details provided in https://github.com/chetanmeh/sling-logback/blob/master/README.md
          Hide
          Chetan Mehrotra added a comment - - edited

          Thanks Felix for looking into this

          What is the source and license for prettify.js ?

          It is taken from http://code.google.com/p/google-code-prettify/ and is under ASL 2.0. I have added NOTICE, DEPENDENCIES and LICENSE file also

          src/main/resources has a rebel.xml file: Can we remove this ?

          Yes. Removed it in new attachment

          OsgiAction extends a private class: Is that really required

          This class needs to be referred to in Logback config file [1]. So I created a shadow file for this in public namespace as referring to class name with 'internal' name in package does not look good

          As for JUL Bridging: I just copied the integration from the current Activator.

          I have added support for that in updated build along with a testcase. Minor change from earlier build was to move Manager initialization after bridge handler is installed.

          I have added some more testcase and features in new build. So you can take that as base

          [1] https://github.com/chetanmeh/sling-logback#external-config-file

          Show
          Chetan Mehrotra added a comment - - edited Thanks Felix for looking into this What is the source and license for prettify.js ? It is taken from http://code.google.com/p/google-code-prettify/ and is under ASL 2.0. I have added NOTICE, DEPENDENCIES and LICENSE file also src/main/resources has a rebel.xml file: Can we remove this ? Yes. Removed it in new attachment OsgiAction extends a private class: Is that really required This class needs to be referred to in Logback config file [1] . So I created a shadow file for this in public namespace as referring to class name with 'internal' name in package does not look good As for JUL Bridging: I just copied the integration from the current Activator. I have added support for that in updated build along with a testcase. Minor change from earlier build was to move Manager initialization after bridge handler is installed. I have added some more testcase and features in new build. So you can take that as base [1] https://github.com/chetanmeh/sling-logback#external-config-file
          Hide
          Felix Meschberger added a comment -

          Cool thanks. Looking at it.

          Show
          Felix Meschberger added a comment - Cool thanks. Looking at it.
          Hide
          Felix Meschberger added a comment - - edited

          I have committed a slightly modified version of the code in Rev. 1518083 and updated the reference in the launchpad bundle list in Rev. 1518085

          The modification is mainly using the org.apache.sling.commons.log.logback root package and to apply the changes to the commons.log bundle thereby removing the old implementation.

          Show
          Felix Meschberger added a comment - - edited I have committed a slightly modified version of the code in Rev. 1518083 and updated the reference in the launchpad bundle list in Rev. 1518085 The modification is mainly using the org.apache.sling.commons.log.logback root package and to apply the changes to the commons.log bundle thereby removing the old implementation.
          Hide
          Chetan Mehrotra added a comment -

          All required work now done in current trunk. The Logback support would be available once the 4.0.0 release is done

          Show
          Chetan Mehrotra added a comment - All required work now done in current trunk. The Logback support would be available once the 4.0.0 release is done

            People

            • Assignee:
              Chetan Mehrotra
              Reporter:
              Carl Hall
            • Votes:
              2 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development