Hi Chetan

I have to agree with the others: The primary configuration mechanism for 
logging is and remains to be OSGi configuration. That was one of the reasons 
for writing our own slf4j implementation in the first place and it was one of 
my requirements for another implementation (which is why it took so long to be 
realized).

I agree (and am thankfull for that) that appenders can be provided as services 
to dynamically extend the logging.

I agree that for extended and more stuff, support for XML configuration is good 
and great (yet, I also agree with Justin, that we might want to explore 
supporting more features of LogBack through OSGi configuration).

Finally: I would prefer to keep the default XML empty ! If we want specialized 
configuration for Jackrabbit (which may be usefull) features then the 
Jackrabbit bundle should provide it.

Regards
Felix

—
Felix Meschberger  |  Principal Scientist  |  Adobe



Am 15.11.2013 um 22:29 schrieb Chetan Mehrotra <[email protected]>:

> Hi,
> 
> I am updating the Logging documentation with Logback related changes
> [1]. In doing that I need some suggestion on how should we now
> recommend Sling user to configure Logging
> 
> The current Sling Logging feature set provided two set of configurations
> 
> 1. Logger config - Ability to configure Log level for various logger
> and also provide the file name to which logging must be directed
> (optional). So it mixes Logger and Appender config
> 
> 2. Log Writer Config or Appender Config - Captures details around how
> the file based appender should work i.e. rotation
> 
> Now with Logback these can be configured in a xml file and still be
> augmented via OSGi config. Further the above mode of configuring
> appender would not be able to use full feature set of Logback config.
> So for new setup we can probably suggest following way
> 
> 1. Ship a default logback.xml as part of Sling distribution which
> would be unpacked at say ${sling.home}/etc/logback.xml
> 2. Configure some default appenders and loggers
> 3. Do away with OSGi config for LogWriters completely. FOr backward
> compatibility this feature would continue to be supported
> 4. Also do away with OSGi config for Loggers also or just configure
> appender in Logback config file and Loggers via OSGi config
> 
> If we have agreement then I would not include section on size rotation
> etc in new documentation and would just add links to Logback manual
> 
> Note that
> 1. Current Log support enables extending OSGi based appender
> configuration from within Logback config
> file [2]. So we can enrich existing config easily
> 
> 2. It is also possible to extend Logback config file with config
> fragment support [3]. And later we can provide a JCR integration which
> can use this feature and allows config to be provided via JCR content
> 
> 3. I intend to provide support for editing Logback config (external
> file based) from within Felix WebConsole
> 
> WDYT?
> 
> Chetan Mehrotra
> [1] http://sling.apache.org/documentation/development/logging-new.html
> [2] 
> http://sling.apache.org/documentation/development/logging-new.html#configuring-osgi-based-appenders-in-logback-config
> [3] 
> sling.apache.org/documentation/development/logging-new.html#logback-config-fragment-support

Reply via email to