Skip to main content



      Home
Home » Eclipse Projects » Equinox » How to use Equiniox's LogService ?
How to use Equiniox's LogService ? [message #78003] Mon, 27 November 2006 09:46 Go to next message
Eclipse UserFriend
Originally posted by: barrya.us.ibm.com

I'm looking for a simple example of the LogService usage, I've seen the
LogService interface, but no mention of anything that implements it.

Thanks,
Barry
Re: How to use Equiniox's LogService ? [message #78019 is a reply to message #78003] Mon, 27 November 2006 11:00 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tonimenzel.gmx.de

Hi Barry,

I've just experimented with the log service.

You can access the service like any other service using the api:
---
ServiceReference logger[] =
context.getServiceReferences(org.osgi.service.log.LogService .class.getName(),null);
LogService logger = (LogService)context.getService(logger[0]);
---

To actually "see" somthing you log, you have to implement a LogReader,
to listen for log-events and do something with it (fowarding to a
log4j,database or just System.out)

I've experimented with the latter one.
You may want to look at this (pretty simple bundle):
http://www.razor-m.de/logdump.zip

This is the logdump-service which dumps every log-event to the
System.out Stream.

have fun,
Toni

To explain the basic concept:



Barry Atkins schrieb:
> I'm looking for a simple example of the LogService usage, I've seen the
> LogService interface, but no mention of anything that implements it.
>
> Thanks,
> Barry
>
>
Re: How to use Equiniox's LogService ? [message #78035 is a reply to message #78003] Mon, 27 November 2006 11:13 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: tonimenzel.gmx.de

ahh.. you are looking for the implementation?
the equinox implementation is located at the eclipse repository:
source:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox .log/

You can use another implementation from apache felix, too:
http://www.peakall.com/osgi/
(it was donated to apache felix;with prebuild bundle and src)

Toni

Barry Atkins schrieb:
> I'm looking for a simple example of the LogService usage, I've seen the
> LogService interface, but no mention of anything that implements it.
>
> Thanks,
> Barry
>
>
Re: How to use Equiniox's LogService ? [message #78245 is a reply to message #78035] Thu, 30 November 2006 23:44 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jeff_mcaffer.REMOVE.ca.ibm.com

note that the built Equinox bundles are available at
http://download.eclipse.org/eclipse/equinox

Jeff

Toni Menzel wrote:
> ahh.. you are looking for the implementation?
> the equinox implementation is located at the eclipse repository:
> source:
> http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.equinox .log/
>
> You can use another implementation from apache felix, too:
> http://www.peakall.com/osgi/
> (it was donated to apache felix;with prebuild bundle and src)
>
> Toni
>
> Barry Atkins schrieb:
>> I'm looking for a simple example of the LogService usage, I've seen
>> the LogService interface, but no mention of anything that implements it.
>>
>> Thanks,
>> Barry
>>
Re: How to use Equiniox's LogService ? [message #79095 is a reply to message #78003] Thu, 14 December 2006 09:56 Go to previous message
Eclipse UserFriend
Barry Atkins napisał(a):
> I'm looking for a simple example of the LogService usage, I've seen the
> LogService interface, but no mention of anything that implements it.
>
> Thanks,
> Barry
>
>

Corona have project has a LogReader that writes log entries to Log4j.

http://dev.eclipse.org/viewcvs/indextech.cgi/org.eclipse.cor ona/plugins/org.eclipse.corona.logger.log4j/


Marcin Okraszewski
Previous Topic:problem with export of bundles when resuming an osgi application
Next Topic:cannot find the sqlmap-config.xml
Goto Forum:
  


Current Time: Fri May 30 20:59:38 EDT 2025

Powered by FUDForum. Page generated in 0.03992 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top