Skip to content

Updates for Serilog 4 #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 14, 2024
Merged

Updates for Serilog 4 #22

merged 9 commits into from
Jun 14, 2024

Conversation

Numpsy
Copy link
Member

@Numpsy Numpsy commented Jun 11, 2024

Update to Serilog 4, update explicit TFMs to match, internalize the enricher classes as described for the Environment enricher in serilog/serilog-enrichers-environment#63

@@ -43,7 +43,7 @@ public void Enrich(LogEvent logEvent, ILogEventPropertyFactory propertyFactory)
var threadId = Environment.CurrentManagedThreadId;

var last = _lastValue;
if (last == null || (int)((ScalarValue)last.Value).Value != threadId)
if (last is null || (int)((ScalarValue)last.Value).Value! != threadId)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the ! for these on the assumption that the ScalarValue is always created here, and doesn't have a null value

@Numpsy Numpsy marked this pull request as ready for review June 13, 2024 12:45
@nblumhardt nblumhardt merged commit 602315b into serilog:dev Jun 14, 2024
1 check passed
@nblumhardt
Copy link
Member

LGTM 👍

@nblumhardt nblumhardt mentioned this pull request Jun 14, 2024
@Numpsy Numpsy deleted the updates branch June 14, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants