[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] Using log4j with LogService

Thanks for the quick reply. Yes I can use the LogReader Service and then direct it to log4j. However this means that I will have to do a getBundle() or get ServiceReference on the LogEntry and do a check everytime there is something logged whether it is something i`m interested in. With a lot of bundles loaded in OSGi, i`m concerned whether this could become a bottleneck. Please adviseand correct me if wrong.


Thanks,

Srijith.

>>> BJ Hargrave <hargrave@xxxxxxxxxx> 03/18/08 8:50 AM >>>

You can write code which uses to LogReaderService to receive log entries as they are written to the LogService and the writes them to log4j.

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the OSGi Alliance
hargrave@xxxxxxxxxx
Office: +1 386 848 1781 Mobile: +1 386 848 3788


 ----- Original Message -----
  From: "Srijith Kochunni" [ksrijith@xxxxxxxxxx]
  Sent: 03/17/2008 09:21 PM
  To: <equinox-dev@xxxxxxxxxxx>
  Subject: [equinox-dev] Using log4j with LogService


Hi All,


           I am working on the logging module of a project which uses log4j.  I am writing it as a bundle which will expose it`s own service for logging in the OSGi runtime. I would like to know whether it is possible for me to integrate this with the Equinox Log Service? For example is it possible for me to configure the OSGi Log Service as an appender for my log4j module. My intention is that consumer bundles should be able to use either OSGi Log Service/ My Logging service and logs should happen in both.


Thanks in advance for your help.


-

Srijith.