Hi, Yes, if you configure log4j using Configurator#configureAndWatch (rather than just Configurator#configure which is the default).
Yoav Shapira Millennium Research Informatics >-----Original Message----- >From: Samir Shaikh (ex 444) [mailto:[EMAIL PROTECTED] >Sent: Wednesday, April 07, 2004 1:25 PM >To: 'Log4J Users List'; [EMAIL PROTECTED] >Subject: RE: Is it possible to set log levels at runtime? > >Hi, >Can I change the log4j.properties file and expect the application to change >at runtime (i.e. w/o restarting the app)? >Thanks. >Samir > >-----Original Message----- >From: Shapira, Yoav [mailto:[EMAIL PROTECTED] >Sent: Friday, April 02, 2004 6:04 AM >To: Log4J Users List; [EMAIL PROTECTED] >Subject: RE: Is it possible to set log levels at runtime? > > > >Hi, >Yes, it's possible and has always been, as it's a core log4j feature. I >personally have a simple servlet that takes two string parameters, the >logger name and level, and does >Logger x = Logger.getLogger(request.getParameter("loggerName")); >x.setLevel(Level.toLevel(request.getParameter("loggingLevel"))); >(I actually have a bit more error checking for null parameters, but the >above is the meat of it). > >As for JMX, I think it's possible but haven't tried it. > >Yoav Shapira >Millennium Research Informatics > > >>-----Original Message----- >>From: Michael Mattox [mailto:[EMAIL PROTECTED] >>Sent: Thursday, April 01, 2004 11:50 PM >>To: [EMAIL PROTECTED] >>Subject: Is it possible to set log levels at runtime? >> >>Is it possible to set log levels (for example go from INFO to debug) at >>runtime, without restarting the application?? Would it be possible to >set >>the log level with JMX? I'm curious how people are doing this in >>production. It seems like a very useful thing to turn on/off debug >logging >>for an app running in production. >> >>Thanks >>Michael >> >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: [EMAIL PROTECTED] >>For additional commands, e-mail: [EMAIL PROTECTED] > > > > >This e-mail, including any attachments, is a confidential business >communication, and may contain information that is confidential, >proprietary >and/or privileged. This e-mail is intended only for the individual(s) to >whom it is addressed, and may not be saved, copied, printed, disclosed or >used by anyone else. If you are not the(an) intended recipient, please >immediately delete this e-mail from your computer system and notify the >sender. Thank you. > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
