Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-353

SyslogAppender doesn't respect %nopex, outputs stack trace


    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.0.4
    • Component/s: logback-classic
    • Labels:
    • Environment:

      Ubuntu (11.10) & Red Hat (RHEL 5.8) Linux, Java 1.6, Shibboleth Identity Provider 2.3.6


      (See http://mailman.qos.ch/pipermail/logback-user/2012-April/003096.html )

      When using SyslogAppender, stack trace output appears in the output of the Appender, contrary to the configured (or programmed) layout.

      When my SyslogAppender is used, stack traces appear in my syslog output, even though I don't want them. I've included a "%nopex" at the end of the SuffixPattern value, but this has not stopped the stack traces from appearing. I've tested a matching RollingFileAppender, where "%nopex" has the expected behavior.

      I'd expect that SyslogAppender would omit stack traces by default, or at least give me a way to omit them.

      I've looked at the source for SyslogAppender.java, and I see (about line 43) that the prefixPattern already includes "%nopex" so I'm at a loss as to why I'm seeing stack traces to begin with.

      I've configured a SyslogAppender as follows.
      The "%nopex" at the end doesn't matter. I can leave it out with identical results.
      The blank space at the beginning of SuffixPattern doesn't matter either. I can leave it out with identical results.

      <appender name="IDP_SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender">
      <SuffixPattern> [%logger:%level] %msg %mdc


      from %mdc






            • Assignee:
              ceki Ceki Gülcü
              dfaulkner Don Faulkner
            • Votes:
              1 Vote for this issue
              3 Start watching this issue


              • Created: