Logging in .NET
There are five sample source code projects in this collection of samples. The samples are written in C# and the content of the related docs is covered in Logging in .NET articles. In addition to an overview, there are in-depth articles discussing logging providers, compile-time logging source generation, details for implementing a custom logging provider, information on high-performance logging, and console log formatting.
The samples are written in C# and targets .NET 6. It requires the .NET 6.0 SDK or later.
Building the sample
To download and run the sample, follow these steps:
- Download and unzip the sample.
- In Visual Studio (2022 or later):
- On the menu bar, choose File > Open > Project/Solution.
- Navigate to the folder that holds the unzipped sample code, and open the C# project (.csproj) file.
- Choose the F5 key to run with debugging, or Ctrl+F5 keys to run the project without debugging.
- From the command line:
- Navigate to the folder that holds the unzipped sample code.
- At the command line, type