[logback-user] (Important) Dynamically change the scan period

simplysivu simplysivu at gmail.com
Mon Apr 8 14:49:59 CEST 2013


I am using logback for restful webservices over jersey api.. using apache
I have created logback file like the following... 

<?xml version="1.0" encoding="UTF-8"?> 
<configuration scan="true" scanPeriod="2 seconds">

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender" >
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -

  <root level="debug">
    <appender-ref ref="STDOUT" />

and in my code i have written.. 

Logger logger = LoggerFactory.getLogger(AuthenticateResource.class); 
                logger.debug("Hello world."); 

when i run my code.. 
Hello world is being displayed.. 

now if i change my root level to info in logback.xml and if i run the code
without restarting the server. 
Hello world is being displayed.. 

but, it should not be displayed.. 

Do I need to add anything such that the file loads automatically and stop
debug messages to display without restarting my server. 

thanks and regards, 

View this message in context: http://logback.10977.n7.nabble.com/Important-Dynamically-change-the-scan-period-tp3550p11788.html
Sent from the Users mailing list archive at Nabble.com.

More information about the Logback-user mailing list