Hi *,

in our application we have our own logging-system: some statements get
point out at the console, other statements will be written into a
database. 

A few bundles (3rd party: jpa, jboss, etc) use log4j. To cover those
log4j-statements we have an Appender, which maps log4j-LoggingEvents to
our logging-system. Thats the theory.

The reality asks: How can you do this?
The first approach was an extension-bundle that contained the
log4j.properties-file. While using log4j-appenders everything worked
fine, because those bundles, that use log4j, have import-declarations on
log4j. When we tried to use our own appenders, those bundles would need
an import on our appender-package (the extension-bundle must not have
import-declaration). But to hack these declarations into the bundles is
not a good idea.

So we tried fragment-bundles. But a fragment can just only have one
host...also, not good.

The third (and for now the last) idea was to create a bundle, that
configures log4j programmatically (no log4j.properties file). And heyja,
there you go. But for logger "org.jboss.messaging.util.Version" was no
appender found. Thats curious, because we have configured a RootLogger,
that should log everything, shouldn't it? At least jpa and mortybay
don't complain about having no appender. When we set a specific logger
to "org.jboss.messaging.util.Version" nothing changes.

So did anyone saw those problems to and solved it? Has anyone another
approach that will be solving this problem?

Thanks for any reply,
 Kevin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to