Uploaded image for project: 'Log4cxx'
  1. Log4cxx
  2. LOGCXX-283

Suspicious, but harmless, reuse of LOCAL1 in SyslogAppender::getFacility

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.11.0
    • Appender
    • None

    Description

      The implementation of SyslogAppender::getFacility has fragments like the following where you'd expect the uppercased facility name to be in sync with the lower case:

      else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL1"), LOG4CXX_STR("local1")))

      { return LOG_LOCAL1; }

      else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL1"), LOG4CXX_STR("local2")))

      { return LOG_LOCAL2; }

      else if (StringHelper::equalsIgnoreCase(s, LOG4CXX_STR("LOCAL1"), LOG4CXX_STR("local3")))

      { return LOG_LOCAL3; }

      However the unintentional reuse of LOCAL1 does not have any negative consequences.

      Attachments

        Activity

          People

            carnold@apache.org Curt Arnold
            carnold@apache.org Curt Arnold
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: