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