Hi,
I'm trying to get logback to read an external config xml and "scan" it for
changes,
I've setup an entry in web.xml and done it via an include..
All looks good when I run it, change is detected in external file , but changes
to fillter logging levels are ignored, in fact if I blank the entire external
file it's also ignored !!
>From ready various other posts this should be possible , it was fixed in
>0.9.16 but perhaps I've missed something fundamental
I've changed the filter up to ERROR and I still get INFO output !!
Web.xml
<env-entry>
<env-entry-name>logback-file</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>C:/logback_properties/localhost/logon.xml</env-entry-value>
</env-entry>
Logback.xml
<configuration scan="true" scanPeriod="10 seconds" debug="true" >
<insertFromJNDI env-entry-name="java:comp/env/logback-file" as="logback-file" />
<include file="${logback-file}" />
</configuration>
Logon.xml [i.e. external file]
<?xml version="1.0" encoding="UTF-8"?>
<included>
<appender name="A1" class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
<File>C:/logs/localhost/logon.log</File>
<encoder>
<pattern>%d{ISO8601} %-5p %c - %m%n</pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>C:/logs/localhost/logon.log.%d</fileNamePattern>
<maxHistory>2</maxHistory>
</rollingPolicy>
</appender>
<root level="DEBUG">
<appender-ref ref="A1"/>
</root>
</included>
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user