SLING-3045 - [logback]Warning logs logged for 'No appenders present in context [sling] for logger'

Instead of removing the console logger asscoaited with root logger by default we check now if root logger has any appender associated with it or not. if not then console logger is not removed

Also moved this logic out as a separate listener and ensure that this listener is invoked at the end of config cycle.

git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1566597 13f79535-47bb-0310-9956-ffa450edef68
2 files changed
tree: 052a4069be8c5053a1acb8066ef3ee5e5a243b01
  1. src/
  2. pom.xml
  3. README.md
README.md

Apache Sling Commons Log

The “log” project packages the Logback library to manage logging in OSGi environment. It provide some useful extension to the default Logback feature set to enable better integration with OSGi. The SLF4j API bundle must be installed along with this bundle to provide full SLF4J logging support.

The Logging bundle should be installed as one of the first modules in the OSGi framework and - provided the framework supports start levels - be set to start at start level 1. This ensures the Logging bundle is loaded as early as possible thus providing services to the framework and preparing logging.

For more details refer to the Logging Documentation

Getting Started

You can compile and package the jar using the following command:

mvn package -Pide,coverage

It would build the module and also produce a test coverage report also prepare bundle jar which is suitable to be used to run integration test from within IDE.