Relative Content

Tag Archive for c#serilogserilog-filter

Filtering Serilog logs to different sinks depending on Property

I am attempting to integrate Serilog into my ASP.NET Core API project to log specific types of entries to different sinks based on their propertry. My goal is to configure the logger so that when the Serilog Context includes a specific property, the logs are written to a file; otherwise, they should be directed to SEQ . But this not working for me.
Please find below my Code