Skip to content

v3 branch is not working for .net core paltform #55

@yeibl

Description

@yeibl

i fix bug that is no working for .net core platform , i found it in BackwardCompatibility class .
when reflect loggingEvent class and get GetProperties like this
`
PropertiesDictionary compositeProperties = loggingEvent.GetProperties();
if (compositeProperties != null && compositeProperties.Count > 0)
{
var properties = new BsonDocument();
foreach (DictionaryEntry entry in compositeProperties)
{
properties.Add(entry.Key.ToString(), entry.Value);
}

			toReturn.Add("properties", properties);
		}

change to
PropertiesDictionary compositeProperties = loggingEvent.GetProperties();
if (compositeProperties != null && compositeProperties.Count > 0)
{
var properties = new BsonDocument();
foreach (DictionaryEntry entry in compositeProperties)
{
properties.Add(entry.Key.ToString(), entry.Value.ToString() ?? "");
}

			toReturn.Add("properties", properties);
		}

`
then is work for me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions