Issue Details (XML | Word | Printable)

Key: LOGCXX-29
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Curt Arnold
Reporter: Martin Landers
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Log4cxx

Appender attributes are not passed passed to setOption correctly.

Created: 21/Oct/04 04:31 PM   Updated: 22/Oct/04 02:08 PM
Return to search
Component/s: Appender
Affects Version/s: 0.9.7
Fix Version/s: 0.10.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works log4cxx_optionpassing.patch 2004-10-21 04:33 PM Martin Landers 7 kB
Environment: Linux (but affects all platforms)

Resolution Date: 22/Oct/04 02:08 PM


 Description  « Hide
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...

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Martin Landers added a comment - 21/Oct/04 04:33 PM
Patch fixing the wrong setOption calls in different appenders.

Curt Arnold added a comment - 22/Oct/04 02:08 PM
I've committed your patch plus unit tests for all appenders.


CVS commit message: http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4cxx-dev@logging.apache.org&msgNo=322