You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Elvy <pi...@gmail.com> on 2008/01/09 13:22:06 UTC
how to use the LogService
Hi all,
I'd like to use some kind of LogService but just can't find how to set it up
and use it. I feel like it's time to get rid of my calls to System.out
:wistle:.
Is this service provided by Felix by default?
Does I have to add it myself to the config.properties?
What are the best coding practices? Ask for it everytime I require logging
services or store it?
How does one configure which class to log and there associated log levels?
Thanks for your help and happy new year to all (Oughtta tell it once at
least ;-) )
-----
Tell me something you don't know!
--
View this message in context: http://www.nabble.com/how-to-use-the-LogService-tp14710801p14710801.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: how to use the LogService
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Elvy wrote:
> which implementations exist? Is there any one better than the others?
>
Well, there is at least a simple implementation in Felix, but you will
have to build from source, since we are still working on an official
release...hopefully coming soon now.
-> richard
>
>
> -----
> Tell me something you don't know!
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: how to use the LogService
Posted by Felix Meschberger <fm...@gmail.com>.
Am Mittwoch, den 09.01.2008, 08:14 -0800 schrieb Elvy:
> which implementations exist? Is there any one better than the others?
I know of two others: PAX Logging [1] and Apache Sling osgi/log [2].
I can only speak for Sling's osgi/log (because this is what I did ;-) ):
I implements the OSGi LogService, exports SLF4J, Commons Logging and
Log4J API. As a real logging backend it uses Logback [3].
Regards
Felix
[1] http://www.ops4j.org/projects/pax/logging/
[2] http://incubator.apache.org/sling
[3] http://logback.qos.ch
>
>
>
> -----
> Tell me something you don't know!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: how to use the LogService
Posted by Elvy <pi...@gmail.com>.
which implementations exist? Is there any one better than the others?
-----
Tell me something you don't know!
--
View this message in context: http://www.nabble.com/how-to-use-the-LogService-tp14710801p14715280.html
Sent from the Apache Felix - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org
Re: how to use the LogService
Posted by "Richard S. Hall" <he...@ungoverned.org>.
Elvy wrote:
> Hi all,
>
> I'd like to use some kind of LogService but just can't find how to set it up
> and use it. I feel like it's time to get rid of my calls to System.out
> :wistle:.
>
> Is this service provided by Felix by default?
> Does I have to add it myself to the config.properties?
>
Not, it is not provided by default. It is a bundle that you must install
and start. You can do this by saving to the directory containing your
shell bundles and have it auto-start by editing your config.properties
or you can just install it manually into your profile.
> What are the best coding practices? Ask for it everytime I require logging
> services or store it?
>
Well, you can cache the reference, but since it is a service, you will
still have to listen for it to depart, just in case, so you can stop
using it if is goes away.
> How does one configure which class to log and there associated log levels?
>
I am not sure I totally understand the question, but check the Log
Service spec documentation and I think that will answer your questions.
-> richard
> Thanks for your help and happy new year to all (Oughtta tell it once at
> least ;-) )
>
> -----
> Tell me something you don't know!
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org