[slf4j-user] How to programmatically set log level in SLF4J?

Setumadhav Kulkarni sekulkar at tibco.com
Thu Mar 15 06:41:48 CET 2007


Yes I would think that using the logger package directly would be a good
idea, if you are not planning to use the slf4j feature of letting you
switch the underlying logging package...

-----Original Message-----
From: user-bounces at slf4j.org [mailto:user-bounces at slf4j.org] On Behalf
Of wolverine my
Sent: Thursday, March 15, 2007 11:04 AM
To: User list for the slf4j project
Subject: Re: [slf4j-user] How to programmatically set log level in
SLF4J?

Yes, I agreed that programatically setting the log properties is not a
common practise.

The customer wants to maintain (or bother) only one single application
configuration file.

In order to isolate log4j.properties from the customer, we will have
to read the log level from the current configuration file and set it
into our Log4j logger.

Well, if that is the case... it would be better if we use Log4j
directly without using SLF4J?


On 3/15/07, Setumadhav Kulkarni <sekulkar at tibco.com> wrote:
>
>
> No, you can not do this using slf4j... You may have to use the
underlying
> logger apis (like log4j) to do so... Slf4j is just a facade for the
common
> logging apis...
> I also learn that programatically setting the log properties is not a
common
> practise...
> Thanks and Regards,
> Setu
> -----------------------------------
> setu at tibco.com
> off: +91.20.30212111
> mob: +91.9960692038
>
>
>
> -----Original Message-----
> From: user-bounces at slf4j.org <user-bounces at slf4j.org>
> To: user at slf4j.org <user at slf4j.org>
> Sent: Wed Mar 14 22:20:20 2007
> Subject: [slf4j-user] How to programmatically set log level in SLF4J?
>
> Hi!
>
> With Log4j, we can programmatically set the log level via
> Logger.setLevel(Level).
> How can we do the same using SLF4J?
> _______________________________________________
> user mailing list
> user at slf4j.org
> http://www.slf4j.org/mailman/listinfo/user
>
>
>
> -----Original Message-----
> From: user-bounces at slf4j.org <user-bounces at slf4j.org>
> To: user at slf4j.org <user at slf4j.org>
> Sent: Wed Mar 14 22:20:20 2007
> Subject: [slf4j-user] How to programmatically set log level in SLF4J?
>
> Hi!
>
> With Log4j, we can programmatically set the log level via
> Logger.setLevel(Level).
> How can we do the same using SLF4J?
> _______________________________________________
> user mailing list
> user at slf4j.org
> http://www.slf4j.org/mailman/listinfo/user
>
>
>
> _______________________________________________
> user mailing list
> user at slf4j.org
> http://www.slf4j.org/mailman/listinfo/user
>
_______________________________________________
user mailing list
user at slf4j.org
http://www.slf4j.org/mailman/listinfo/user



More information about the slf4j-user mailing list