C# - Serilog, how to change the log level dynamically at runtime
The secret to changing the log level at runtime in your application is the LoggingLevelSwitch. This can be applied in two places, one is the MinimumLevel »
The secret to changing the log level at runtime in your application is the LoggingLevelSwitch. This can be applied in two places, one is the MinimumLevel »
This post describes how to combine serilog's property enrichment with ASP.Net's middleware and pipeline to enrich all logs in a request »
TLDR: You are likely looking for setting up an outputTemplate in your logger configuration: Log.Logger = loggerConfiguration .Enrich.FromLogContext() //remember this! .WriteTo .Console(outputTemplate: "[{Timestamp: »
This post describes and demonstrates how to enrich your serilog log events with your own arbitrary properties. The first part will be on enriching with properties »
It took me much longer to realize a solution to this problem than I want to admit. I had something like the following in my code »
This post describes how to exclude certain log entries based on their http path when using Serilog together with UseSerilogRequestLogging. I recently had this issue where »
This post describes how to exclude certain log entries based on properties using Serilog. We will use the following setup for this post: //More above but »
You can delete an item in an array using the splice function. All you need to know is the index of the element you want to »
In C#, LINQ (Language INtegrated Query) is a powerful tool for querying and manipulating data. LINQ provides an intuitive way to interact with various data sources, »
In C# you can easily check if a string contains one character or a series of characters using the .Contains() method on the String object. Below »