Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [equinox-dev] Access to Equinox Logging

Hi,

yes, this solution does not address the problem to get hold of the messages written by the Equinox OSGi Runtime. But we have never experienced the occurence of messages from the Equinox Runtime. So this problem not really matters for our application. Sorry.

I took a short look into the FrameworkLog interface and its implementations and I would suggest to provide a new implementation for this interface. Regardless of the comments in the source code. In this implementation you can redirect all messages to the JUL-Logger for example and then catch these messages with the Logback Framework redirecting it to the place/file of your choice.

Florian pepping


-----Original Message-----
From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Marwinski, Dirk
Sent: Thursday, May 07, 2009 1:47 PM
To: Equinox development mailing list
Subject: RE: [equinox-dev] Access to Equinox Logging

Hi,

thanks a lot for pointing this out! This link is actually very 
useful for us as it addresses our primary use case (integrating
several logging frameworks). It however does not address on how 
to get hold of the messages written by the Equinox OSGi Runtime 
itself (sorry if that wasn't clear from my posting below).

Thanks and best regards,
Dirk

-----Original Message-----
From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Pepping, Florian
Sent: Donnerstag, 7. Mai 2009 10:29
To: Equinox development mailing list
Subject: RE: [equinox-dev] Access to Equinox Logging

 
Hi,

we had a similar problem in our (OSGi-)application. We finally found a solution using the Logback-Framework.
The integration and use with osgi/equinox-based applications is described by ekkedard gentz.
http://web.mac.com/ekkehard.gentz/ekkes-corner/blog/Eintr%C3%A4ge/2008/9/24_Logging_in_OSGI_Enterprise_Anwendungen,_Teil_1.html

This solution is quite flexible and we have been successfully solved our logging problems and requirements with this approach.

Florian Pepping


-----Original Message-----
From: equinox-dev-bounces@xxxxxxxxxxx [mailto:equinox-dev-bounces@xxxxxxxxxxx] On Behalf Of Marwinski, Dirk
Sent: Thursday, May 07, 2009 10:01 AM
To: equinox-dev@xxxxxxxxxxx
Subject: [equinox-dev] Access to Equinox Logging

Hi,

we are building an application based on equinox which contains various 
components from various sources using different logging technologies (log4j, 
commons logging, proprietary, ...). We are now trying to get everything into 
one single place (e.g. a single file in a special format which can be 
processed by existing tools in our landscape).

I am a bit puzzled on how I could intercept logs written by equinox in 
order to re-direct them into another logging framework. During my research 
I found postings of people with similar problems (unfortunately there was no 
solution). I hope I am not overlooking something trivial here:

I have seen that Equinox uses the FrameworkLog interface for logging (using 
the EclipseLog implementation). I can set a new Writer
(FrameworkLok.setWriter()) there and "steal" the log messages, however they 
come in multiple pieces which is not ideal.

As an alternative I could write a new implementation of the FrameworkLog 
interface and register it in the service registry, however this is
discouraged (@noimplement annotation), so I didn't try that.

The next possibility would be to extend the EclipseLogHook in order to
provide a new implementation for the FrameworkLog interface, however there
still is the @noimplement annotation... There is btw duplicate code in the
EclipseStarter and EclipseLogHook classes (method createFrameworkLog()).

Do you have any suggestion on how to get access to the log entries? Getting
the messages from the Writer is a possibility but not ideal, better would
be getting access to the FrameworkLogEntry objects which does not seem to 
be possible at the moment. Implementing an AdapterHook would be a possibility 
but I am hesitant to go that way if I don't really have to. 

If there is anything that I can contribute let me know.

Thanks,
Dirk


Dirk Marwinski 
SAP AG
Dietmar-Hopp-Allee 16
69190 Walldorf, Germany
T +49 6227 7-64674 
F +49 6227 78-40949 
M +49 160 90 81 99 83
mailto:dirk.marwinski@xxxxxxx
www.sap.com


Sitz der Gesellschaft/Registered Office: Walldorf, Germany
Vorstand/SAP Executive Board: Henning Kagermann (Sprecher/Co-CEO), Léo Apotheker (Sprecher/Co-CEO), Werner Brandt, Erwin Gunst, Claus Heinrich, Bill McDermott, Gerhard Oswald, John Schwarz, Jim Hagemann Snabe 
Vorsitzender des Aufsichtsrats/Chairperson of the SAP Supervisory Board: Hasso Plattner
Registergericht/Commercial Register Mannheim No HRB 350269 

Diese E-Mail kann Betriebs- oder Geschäftsgeheimnisse oder sonstige vertrauliche Informationen enthalten. Sollten Sie diese E-Mail irrtümlich erhalten haben, ist Ihnen eine Kenntnisnahme des Inhalts, eine Vervielfältigung oder Weitergabe der E-Mail ausdrücklich untersagt. Bitte benachrichtigen Sie uns und vernichten Sie die empfangene E-Mail. Vielen Dank. 

This e-mail may contain trade secrets or privileged, undisclosed, or otherwise confidential information. If you have received this e-mail in error, you are hereby notified that any review, copying, or distribution of it is strictly prohibited. Please inform us immediately and destroy the original transmittal. Thank you for your cooperation. 

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

-- 
WINCOR NIXDORF International GmbH 
Sitz der Gesellschaft: Paderborn 
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller 
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. 

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

-- 
WINCOR NIXDORF International GmbH 
Sitz der Gesellschaft: Paderborn 
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller 
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. 



Back to the top