Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-102

Bad priority in Syslog messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 2.0-beta2
    • 2.0-beta3
    • Layouts
    • None

    Description

      In class org.apache.logging.log4j.core.net.Priority the method getPriority returns a bad priority when used for Syslog messages (the only usage at the moment). The bug is in the statement:

      facility.getCode() << 3 + Severity.getSeverity(level).getCode()

      That's because the operator "+" takes precedence over "<<", and so the facility code isn't shifted by 3 but by "3 + Severity.getSeverity(level).getCode()".

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              colomboe Emanuele Colombo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: