[logback-user] Using JNDIBasedContextDiscriminator with access SiftingAppender

Xavier Dury kalgon at hotmail.com
Thu May 16 16:47:14 CEST 2013


I would like to do something like this in my logback-access.xml:

<appender name="FILE" class="ch.qos.logback.access.sift.SiftingAppender">
  <discriminator class="ch.qos.logback.classic.sift.JNDIBasedContextDiscriminator" />
    <appender class="ch.qos.logback.core.FileAppender">
      <encoder class="ch.qos.logback.access.PatternLayoutEncoder">
        <pattern>%h %l %u %user %date "%r" %s %b</pattern>

but it doesn't work because I'm using a discriminator from logback-classic (JNDI).

As the only discriminator in logback-access is AccessEventDiscriminator, is there another way to split access logs in multiple files (one per application)?



More information about the Logback-user mailing list