OK, thanks, how can I change logging properties file? I am using Eclipse...
On 10/18/07, Setumadhav Kulkarni <[EMAIL PROTECTED]> 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 > ----------------------------------- > [EMAIL PROTECTED] > off: +91.20.30212111 > mob: +91.9960692038 > > > ----- Original Message ----- > From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> > To: User list for the slf4j project <[email protected]> > 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 <[EMAIL PROTECTED]> wrote: > > Sorry for the typo! Properties file should have the log level set > to debug. > Thanks and Regards, > Setu > ----------------------------------- > [EMAIL PROTECTED] > off: +91.20.30212111 > mob: +91.9960692038 > > > ----- Original Message ----- > From: Setumadhav Kulkarni > To: '[email protected]' < [email protected] > <mailto:[email protected]<[email protected]>> > > > > > 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 > ----------------------------------- > [EMAIL PROTECTED] > off: +91.20.30212111 > mob: +91.9960692038 > > > ----- Original Message ----- > From: [EMAIL PROTECTED] < [EMAIL PROTECTED] < > mailto:[EMAIL PROTECTED] <[EMAIL PROTECTED]>> > > To: [email protected] < [email protected] > <mailto:[email protected]<[email protected]>> > > > 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 > [email protected] > http://www.slf4j.org/mailman/listinfo/user < > http://www.slf4j.org/mailman/listinfo/user> > > > > > _______________________________________________ > user mailing list > [email protected] > http://www.slf4j.org/mailman/listinfo/user >
_______________________________________________ user mailing list [email protected] http://www.slf4j.org/mailman/listinfo/user
