[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[equinox-dev] Access to Equinox Logging
- From: "Marwinski, Dirk" <dirk.marwinski@xxxxxxx>
- Date: Thu, 7 May 2009 10:00:47 +0200
- Delivered-to: firstname.lastname@example.org
- Thread-index: AcnO6e325FgeFFQeRpqrn9KHV8QT/Q==
- Thread-topic: Access to Equinox Logging
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.
69190 Walldorf, Germany
T +49 6227 7-64674
F +49 6227 78-40949
M +49 160 90 81 99 83
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.