<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.59">
<TITLE>Re: [slf4j-user] How to use Debug....</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Using slf logger you won't be able to set the log level from the code.<BR>
<BR>
What you are doing in the code is just logging a debug message.<BR>
<BR>
You may need to configure details about the appender and log level in the logging properties file.<BR>
<BR>
The false message you are seeing by virtue of the sysout.<BR>
Thanks and Regards,<BR>
Setu<BR>
-----------------------------------<BR>
setu@tibco.com<BR>
off: +91.20.30212111<BR>
mob: +91.9960692038<BR>
<BR>
<BR>
----- Original Message -----<BR>
From: user-bounces@slf4j.org <user-bounces@slf4j.org><BR>
To: User list for the slf4j project <user@slf4j.org><BR>
Sent: Wed Oct 17 23:22:35 2007<BR>
Subject: Re: [slf4j-user] How to use Debug....<BR>
<BR>
Sorry, could you provide more instructions? Like how to set a log to debug level?<BR>
I thought logger.debug("Temperature set to {}. Old temperature was {}.", t, oldT); should work, but it seems not...<BR>
<BR>
<BR>
On 10/18/07, Setumadhav Kulkarni <sekulkar@tibco.com> wrote:<BR>
<BR>
Sorry for the typo! Properties file should have the log level set to debug.<BR>
Thanks and Regards,<BR>
Setu<BR>
-----------------------------------<BR>
setu@tibco.com<BR>
off: +91.20.30212111<BR>
mob: +91.9960692038<BR>
<BR>
<BR>
----- Original Message -----<BR>
From: Setumadhav Kulkarni<BR>
To: 'user@slf4j.org' < user@slf4j.org <<A HREF="mailto:user@slf4j.org">mailto:user@slf4j.org</A>> ><BR>
<BR>
<BR>
Sent: Wed Oct 17 23:01:53 2007<BR>
Subject: Re: [slf4j-user] How to use Debug....<BR>
<BR>
You will have to set the debug level in your orperryies file to debug. I suspect it is set to info right now.<BR>
Thanks and Regards,<BR>
Setu<BR>
-----------------------------------<BR>
setu@tibco.com<BR>
off: +91.20.30212111<BR>
mob: +91.9960692038<BR>
<BR>
<BR>
----- Original Message -----<BR>
From: user-bounces@slf4j.org < user-bounces@slf4j.org <<A HREF="mailto:user-bounces@slf4j.org">mailto:user-bounces@slf4j.org</A>> ><BR>
To: user@slf4j.org < user@slf4j.org <<A HREF="mailto:user@slf4j.org">mailto:user@slf4j.org</A>> ><BR>
Sent: Wed Oct 17 22:32:18 2007<BR>
Subject: [slf4j-user] How to use Debug....<BR>
<BR>
This is my testing code:<BR>
<BR>
import org.slf4j.Logger;<BR>
import org.slf4j.LoggerFactory;<BR>
<BR>
public class Wombat {<BR>
<BR>
final Logger logger = LoggerFactory.getLogger(Wombat.class);<BR>
<BR>
Integer t;<BR>
<BR>
Integer oldT;<BR>
<BR>
public void setTemperature(Integer temperature) {<BR>
<BR>
oldT = t;<BR>
t = temperature;<BR>
<BR>
logger.debug("Temperature set to {}. Old temperature was {}.", t, oldT);<BR>
<BR>
System.out.println(logger.isDebugEnabled());<BR>
<BR>
if (temperature.intValue() > 50) {<BR>
logger.info("Temperature has risen above 50 degrees.");<BR>
}<BR>
}<BR>
<BR>
public static void main(String[] args) {<BR>
<BR>
Wombat wombat = new Wombat();<BR>
<BR>
wombat.setTemperature(1);<BR>
<BR>
wombat.setTemperature(55);<BR>
}<BR>
}<BR>
<BR>
<BR>
<BR>
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!@<BR>
<BR>
<BR>
<BR>
<BR>
_______________________________________________<BR>
user mailing list<BR>
user@slf4j.org<BR>
<A HREF="http://www.slf4j.org/mailman/listinfo/user">http://www.slf4j.org/mailman/listinfo/user</A> <<A HREF="http://www.slf4j.org/mailman/listinfo/user">http://www.slf4j.org/mailman/listinfo/user</A>><BR>
<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>