[logback-user] Using conditional processing

Michael C Rosenstein mcr at mdibl.org
Tue Jan 25 19:41:32 CET 2011


Hello, I've been experimenting with logback core/classic 0.9.27 (and 
slf4j 1.6.1) with Tomcat 6.0.29, Java 1.6 on Solaris for the past couple 
days, and have hit a wall viz conditional configuration processing.

When I include a conditional like the following in my configuration 
file, nothing in the file is processed beginning with and after that 
directive:

     <if condition='property("HOSTNAME").contains("hactar")'>
         <then>
             <property name="foo" value="bar"/>
         </then>
     </if>

Even a conditional as simple as the following causes processing to abort:

     <if condition='"foo".equals("foo")'>
         <then>
             <property name="foo" value="bar"/>
         </then>
     </if>

No errors seen in the ViewStatusMessagesServlet.

Am I doing something wrong?

Thanks.

/mcr


More information about the Logback-user mailing list