Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Riena Logging

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
--

ekkehard gentz
software-architect
erp-consultant
max-josefs-platz 30, D-83022 rosenheim, germany
homeoffice (1+1 VoIP): +49 8031 2068 325
mobile (iPhone): +49 151 19424929
mailto:ekkehard@xxxxxxxxxxxxxxxxx
homepage: http://www.gentz-software.de
opensource: http://ekkehard.org
blog (en): http://ekkes-corner.org
blog (de): http://ekkes-ecke.org
skype: ekke.gentz
Steuer-Nr: 156/220/30931 FA Rosenheim, UST-ID: DE189929490


Back to the top