Issue Details (XML | Word | Printable)

Key: LOG4NET-21
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Nicko Cadell
Reporter: Nicko Cadell
Votes: 0
Watchers: 0
Operations

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

RemotingAppender fails once NDC becomes empty

Created: 04/Apr/05 02:45 AM   Updated: 08/Mar/06 12:19 AM
Return to search
Component/s: Core
Affects Version/s: 1.2.9
Fix Version/s: 1.2.10

Time Tracking:
Not Specified

Resolution Date: 04/Apr/05 03:23 AM


 Description  « Hide
If an NDC, or any form of Context.Stack, is set on the current thread and then becomes empty the RemotingAppender will fail. This is caused by the LoggingEvent Properties failing to serialise due to an unexpected null value in the properties map.

The issue is caused by the GetObjectData method of log4net.Util.ReadOnlyPropertiesDictionary not coping with null values.

Issue reported by Sam Smoot.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Nicko Cadell added a comment - 04/Apr/05 02:49 AM
The ReadOnlyPropertiesDictionary should not serialise key-value pairs with a null key or value.

Null values properties should be stripped from the LoggingEvent composite properties (after allowing for overriding).

Nicko Cadell added a comment - 04/Apr/05 03:23 AM
Fixed by not serialising key-value pairs from the LoggingEvent Properties if the key or value is null.