In absence of a more general solution
where bundles can contribute log configuration via an OSGi service, I think
platform could ship a logback configuration with reasonable defaults to
mitigate the problem a bit (eg, suppress anything below WARNING level and
write errors/warnings to console).
02/07/2013 06:30 PM
AC topic : How to configure slf4j, log4j,
logback etc in a product
I yesterday came across an issue that I
think has been discussed somewhere in the past:
With slf4j, log4j and logback installed
into Eclipse, and several bundles using those API’s
to perform logging, how can a product configure
the logging properly ?
The concrete problem was that one configuration
was logging too much into stdout,
and it’s unclear how to turn that off.
Coding some log configuration into a bundle
is also inappropriate since multiple bundles
would step on each other.
Seems like we need a policy / recommendation
for configuring logging.
Does anybody here on the list have experience
in that area, and/or can point us
to some previous discussions ? Any recommendation
for how to proceed ?