Let's now instrument our sample C# application:
- First, navigate to the project folder, from where you'll open VS Code:
$ cd ~/fod/ch06/dotnet$ code .
- Next, we need to add a NuGet package containing the logging library to the project:
$ dotnet add package Microsoft.Extensions.Logging
This should add the following line to your dotnet.csproj project file:
<PackageReference Include="Microsoft.Extensions.Logging" Version="2.2.0" />
- Open the Program.cs class and notice that we call the CreateDefaultBuilder(args) method on line 21:
This method, by default, adds a few ...