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

You can also try pax-logging, which implements all your required APIs and
logs to one place using a log4j configuration:


It is native OSGi already and requires no other jars to support Log4j, JCL,
OSGi LogService, JDK Logging, Avalon, SLF4J, or Tomcat Juli.

Best Regards,

Don Laidlaw | Sr. Research Engineer | Infor | office: +1 902-576-5185 |
mobile: +1 902-401-6771 | don.laidlaw@xxxxxxxxx

> From: "Pepping, Florian" <florian.pepping@xxxxxxxxxxxxxxxxxx>
> Reply-To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
> Date: Thu, 7 May 2009 10:28:51 +0200
> To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
> 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_Lo
> gging_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 
> 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