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

Appender attributes are not passed passed to setOption correctly.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.7
    • 0.10.0
    • Appender
    • None
    • Linux (but affects all platforms)

    Description

      Many appenders have a bug in their implementation of setOption.
      Instead of passing (option, value) to the superclasses' setOption
      method, they incorrectly pass the appender's name. For example:

      void FileAppender::setOption(const String& option,
      const String& value)
      {
      ...
      WriterAppender::setOption(name, value);
      ... ^^^^
      }

      This bug was probably not discovered before, because until now
      neither WriterAppender, nor AppenderSkeleton were handling
      attributes. But if such attributes are introduced (see LOGCXX-28)
      these typos break them for most handlers...

      Attachments

        1. log4cxx_optionpassing.patch
          7 kB
          Martin Landers

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: