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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.10.0
    • Fix Version/s: 0.11.0
    • Component/s: Appender
    • Labels:
      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

            • Assignee:
              carnold@apache.org Curt Arnold
              Reporter:
              carnold@apache.org Curt Arnold

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment