ekkehard schrieb:
Christian
Campo schrieb:
Stefan knows more about this and he can
answer that question when he returns next week. I think when I look at
the code in LoggerMill what happens is that if you have include
equinox.log in your runtime, you will get an OSGi Service
ExtendedLogReaderService.
If we find that service we try to register there any instance of the
class in extension point org.eclipse.riena.core.logging.listeners. That
listener must be a org.osgi.service.log.LogListener. If there is no
extension we have a fallback strategy to then register the
SysoLogListener......
So maybe you could write a LogListener that feeds the log entries into
slf4j and that would work for you.
thanks - that helps...
Christian,
I did some more tests.
I have NO problems to get the riena logs:
1) I can get them using log4j-over-slf4j
OR
2) I can get them using a LogListener added to
ExtendedLog>readerService as advised from you above.
using 1) I get all logs from beginning,
using 2) only the logs after the ExtendedLogReaderService is running
using 1) I have all freedom to configure, which loggers I want to log
and at which level -
as I understand right, I cant do this with 2)
and because I'm already using log4j-over-slf4 + jcl-over-slf4j +
jul-to-slf4j with logback as native slf4j implementation
I would prefer 1) to get logs from Riena
but there's no way to avoid the double-logging from Riena as described
earlier in the thread,
this means if I catch the logs, then there are 3 logs in console ;-)
if I understand Rienas LogUtil.init() right, you always add the
listeners for SysoLogListener and Log4JListener
the downside of getting logs like 1) is the lost of bundle-info which
is only inside LogEntry
hopefully next week we can make things more clear
I think, Riena often will be used together with other bundles and other
logging strategies, so the logging of Riena should have no side-effects
the other problem I reported (use of apache.xml package):
this also works without commenting the lines in Log4JLogListener - I
only changed the package-import of log4j.xml to optional
ekke
|