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">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>