Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

Fixes two problems, needing to use indexers on a dynamic, and a logic… #266

Merged
merged 1 commit into from
Aug 20, 2019
Merged

Conversation

matthewDDennis
Copy link
Contributor

… error that prevented the durable log files from being processed.
This PR fixes two issues in ElasticsearchLogClient.cs.

  • The first is similar to PR Changed property accessors to dictionary. #264 to address the properties on a dymanic using index access instead of properties. For some reason this property access doesn't work.
  • The second is a logic error the stops the log files from being processed.

… error that prevented the durable log files from being processed.
@matthewDDennis
Copy link
Contributor Author

The first problem is with how the code uses dynamic.
A dynamic variable is just something that can hold any type of object. It is not automatically an ExpandoObject, which you can access with both indexer and property syntax.
In this case the type of the object in the dynamic variable is a Dictionary<string, object>, so only indexers can be used, not property syntax access.

@mivano mivano merged commit 9d9930e into serilog-contrib:dev Aug 20, 2019
@mivano
Copy link
Contributor

mivano commented Aug 20, 2019

Thanks for the PR!

@harlennaves
Copy link

When the will be the release of 8.1 version?

@freeranger
Copy link

This seems not to be in 8.2 either - @mivano do you have an ETA for release of this fix? Thanks

@mivano
Copy link
Contributor

mivano commented Sep 19, 2020

Due to some versioning issue, this will be 8.4, which is just pushed to nuget.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants