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

SyslogAppender prints %PARSER_ERROR[nopexXXX] when suffixPattern doesn't start with [

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Duplicate
    • Affects Version/s: 0.9.30, 1.0.0
    • Fix Version/s: 1.0.10
    • Component/s: None
    • Labels:
      None

      Description

      When I use the SyslogAppender and specify a suffixPattern that starts with a whitespace or other character that is not [ logback seems to just append the string (until the first occurence of certain characters, e.g -) to the internal "%nopex" string. Subsequently it fails to parse the %nopexXXX string and prints something like:

      Jan 12 15:54:14 think %PARSER_ERROR[nopexXXX] [main] LogTest DEBUG FROM JAVA...

      to syslog. Had a look in the sourcecode, but couldn't figure out where it goes wrong, but I could confirm that if I add a whitespace to the string in this line

      String prefixPattern = "%syslogStart

      {" + facilityStr + "}

      %nopex ";

      there is no PARSER_ERROR. An additional whitespace in the logmessage though (I can live with that though). I need to be able to specify a string that doesn't start with [ though for some crazy reason (almost funny – every other character would have been ok as far as I could figure out...).

      Any chance that could be looked into and included in one of the next releases?

      Thanks in advance...

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                logback-dev Logback dev list
                Reporter:
                makkus Markus Binsteiner
              • Votes:
                4 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: