[slf4j-user] How to use Debug....
Jipeng Tan
tan1986 at gmail.com
Thu Oct 18 08:55:47 CEST 2007
OK, thanks, how can I change logging properties file? I am using Eclipse...
On 10/18/07, Setumadhav Kulkarni <sekulkar at tibco.com> wrote:
>
> Using slf logger you won't be able to set the log level from the code.
>
> What you are doing in the code is just logging a debug message.
>
> You may need to configure details about the appender and log level in the
> logging properties file.
>
> The false message you are seeing by virtue of the sysout.
> 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 list for the slf4j project <user at slf4j.org>
> Sent: Wed Oct 17 23:22:35 2007
> Subject: Re: [slf4j-user] How to use Debug....
>
> Sorry, could you provide more instructions? Like how to set a log to debug
> level?
> I thought logger.debug("Temperature set to {}. Old temperature was {}.",
> t, oldT); should work, but it seems not...
>
>
> On 10/18/07, Setumadhav Kulkarni <sekulkar at tibco.com> wrote:
>
> Sorry for the typo! Properties file should have the log level set
> to debug.
> Thanks and Regards,
> Setu
> -----------------------------------
> setu at tibco.com
> off: +91.20.30212111
> mob: +91.9960692038
>
>
> ----- Original Message -----
> From: Setumadhav Kulkarni
> To: 'user at slf4j.org' < user at slf4j.org <mailto:user at slf4j.org<user at slf4j.org>>
> >
>
>
> Sent: Wed Oct 17 23:01:53 2007
> Subject: Re: [slf4j-user] How to use Debug....
>
> You will have to set the debug level in your orperryies file to
> debug. I suspect it is set to info right now.
> 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 <
> mailto:user-bounces at slf4j.org <user-bounces at slf4j.org>> >
> To: user at slf4j.org < user at slf4j.org <mailto:user at slf4j.org<user at slf4j.org>>
> >
> Sent: Wed Oct 17 22:32:18 2007
> Subject: [slf4j-user] How to use Debug....
>
> This is my testing code:
>
> import org.slf4j.Logger;
> import org.slf4j.LoggerFactory;
>
> public class Wombat {
>
> final Logger logger = LoggerFactory.getLogger(Wombat.class);
>
> Integer t;
>
> Integer oldT;
>
> public void setTemperature(Integer temperature) {
>
> oldT = t;
> t = temperature;
>
> logger.debug("Temperature set to {}. Old temperature was
> {}.", t, oldT);
>
> System.out.println(logger.isDebugEnabled());
>
> if (temperature.intValue() > 50) {
> logger.info("Temperature has risen above 50
> degrees.");
> }
> }
>
> public static void main(String[] args) {
>
> Wombat wombat = new Wombat();
>
> wombat.setTemperature(1);
>
> wombat.setTemperature(55);
> }
> }
>
>
>
> Sadly, the output only have the information with log.info, nothing
> about logger.debug, and the output of (logger.isDebugEnabled ()) is also
> false, can anyone tell me how to use debug??? Thanks a lot!@
>
>
>
>
> _______________________________________________
> user mailing list
> user at slf4j.org
> http://www.slf4j.org/mailman/listinfo/user <
> http://www.slf4j.org/mailman/listinfo/user>
>
>
>
>
> _______________________________________________
> user mailing list
> user at slf4j.org
> http://www.slf4j.org/mailman/listinfo/user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-user/attachments/20071018/eaf99170/attachment.htm>
More information about the slf4j-user
mailing list