Hi Sean,
The on console status listener [1] should give you more information as
to what is going on. Just add the following line just after the
<configuration> element in your top-most config file, i.e. logon.xml.
<statusListener
class="ch.qos.logback.core.status.OnConsoleStatusListener" />
HTH,
--
Ceki
[1] http://logback.qos.ch/manual/configuration.html#statusListener
On 01.02.2012 17:04, Sean Kennedy wrote:
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
<configurationscan=/"true"/ scanPeriod=/"10 seconds"/ debug=/"true"/ >
<insertFromJNDIenv-entry-name=/"java:comp/env/logback-file"/
as=/"logback-file"/ />
<includefile=/"${logback-file}"/ />
</configuration>
Logon.xml [i.e. external file]
<?xmlversion=/"1.0"/ encoding=/"UTF-8"/?>
<included>
<appendername=/"A1"/
class=/"ch.qos.logback.core.rolling.RollingFileAppender"/>
<filterclass=/"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>
<rollingPolicyclass=/"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"/>
<fileNamePattern>C:/logs/_localhost_/logon.log.%d</fileNamePattern>
<maxHistory>2</maxHistory>
</rollingPolicy>
</appender>
<rootlevel=/"DEBUG"/>
<appender-refref=/"A1"//>
</root>
</included>
_______________________________________________
Logback-user mailing list
[email protected]
http://mailman.qos.ch/mailman/listinfo/logback-user