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

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


Hi, 

I am using logback for restful webservices over jersey api.. using apache
server. 
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" >
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n</pattern>
    </encoder>
  </appender>

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


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, 
Siva.




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