Skip to content

Fix: Update ConditionalSink expression syntax in sample app#470

Merged
nblumhardt merged 1 commit intoserilog:devfrom
gyurebalint:fix-conditional-sink-syntax
Apr 7, 2026
Merged

Fix: Update ConditionalSink expression syntax in sample app#470
nblumhardt merged 1 commit intoserilog:devfrom
gyurebalint:fix-conditional-sink-syntax

Conversation

@gyurebalint
Copy link
Copy Markdown
Contributor

Description

This PR updates the WriteTo:ConditionalSink expression in the sample application's appsettings.json to use the current CLEF syntax.

The previous syntax (@Level) was outdated and prevented the conditional sink from functioning as intended when users ran the sample. It has been updated to the correct syntax (@l) as documented in the updated Serilog.Expressions package.

Fixes #337

Testing Performed

  • Ran the sample application locally using the .NET CLI.
  • Verified that the conditional sink successfully catches the Error logs and writes them to the %TEMP%/Logs/serilog-configuration-sample-errors.txt file.

Copy link
Copy Markdown
Member

@nblumhardt nblumhardt left a comment

Choose a reason for hiding this comment

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

Thanks!

@nblumhardt nblumhardt merged commit 11dcbc9 into serilog:dev Apr 7, 2026
1 check passed
@nblumhardt nblumhardt mentioned this pull request Apr 30, 2026
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.

WriteTo:ConditionalSink does not work in sample application

2 participants