OK, thanks, how can I <font size="2"> change logging properties file? I am using Eclipse...</font><br><br><div><span class="gmail_quote">On 10/18/07, <b class="gmail_sendername">Setumadhav Kulkarni</b> <<a href="mailto:sekulkar@tibco.com">
sekulkar@tibco.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>
<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.<span class="q"><br>
Thanks and Regards,<br>
Setu<br>
-----------------------------------<br>
<a href="mailto:setu@tibco.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">setu@tibco.com</a><br>
off: +91.20.30212111<br>
mob: +91.9960692038<br>
<br>
<br>
----- Original Message -----<br>
From: <a href="mailto:user-bounces@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">user-bounces@slf4j.org</a> <<a href="mailto:user-bounces@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
user-bounces@slf4j.org</a>><br></span><span class="q">
To: User list for the slf4j project <<a href="mailto:user@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">user@slf4j.org</a>><br>
Sent: Wed Oct 17 23:22:35 2007<br>
Subject: Re: [slf4j-user] How to use Debug....<br>
<br></span><span class="q">
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 <<a href="mailto:sekulkar@tibco.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">sekulkar@tibco.com</a>> 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>
<a href="mailto:setu@tibco.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">setu@tibco.com</a><br>
off: +91.20.30212111<br>
mob: +91.9960692038<br>
<br>
<br>
----- Original Message -----<br>
From: Setumadhav Kulkarni<br></span><span class="q">
To: '<a href="mailto:user@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">user@slf4j.org</a>' < <a href="mailto:user@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
user@slf4j.org</a> <<a href="mailto:user@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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>
<a href="mailto:setu@tibco.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">setu@tibco.com</a><br>
off: +91.20.30212111<br>
mob: +91.9960692038<br>
<br>
<br>
----- Original Message -----<br></span></font></p><div><span class="e" id="q_115b1db38b3e0988_5">
<font size="2"> From: <a href="mailto:user-bounces@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">user-bounces@slf4j.org</a> < <a href="mailto:user-bounces@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
user-bounces@slf4j.org</a> <<a href="mailto:user-bounces@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">mailto:user-bounces@slf4j.org</a>> ><br>
To: <a href="mailto:user@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">user@slf4j.org</a> < <a href="mailto:user@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
user@slf4j.org</a> <<a href="mailto:user@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">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 <a href="http://log.info" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">log.info</a>, 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>
<a href="mailto:user@slf4j.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">user@slf4j.org</a><br></font></span></div><font size="2">
<a href="http://www.slf4j.org/mailman/listinfo/user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.slf4j.org/mailman/listinfo/user</a> <<a href="http://www.slf4j.org/mailman/listinfo/user" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://www.slf4j.org/mailman/listinfo/user</a>><br>
<br>
<br>
<br>
</font>
<p></p>
</div>
<br>_______________________________________________<br>user mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:user@slf4j.org">user@slf4j.org</a><br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.slf4j.org/mailman/listinfo/user" target="_blank">
http://www.slf4j.org/mailman/listinfo/user</a><br></blockquote></div><br>