.NET logging: Setup, configure and write a log with ILogger (uses .NET Core)

Published: 13 March 2022
on channel: Round The Code
51k
379

To configure .NET logging, the ILogger interface can be used when building an ASP.NET Core application in C

With .NET Core, the Microsoft.Extensions.Logging NuGet package provides us with a number of extension methods that allows us to log at different levels.

With the ILogger interface, we can use a logging provider which logs to a particular format. There are a number of logging providers available including log4net and Serilog.

In-addition, we can also build a custom logging provider that allows us to build a .NET logging library and allows us to format a log in the way we want it written.

This video looks at writing a log, the different log levels and how to set the severity for an assembly, and how to configure writing logs for different custom providers. By watching the video, it will give you an idea on the best practices for logging, and will give you an idea on how to use it for your framework.

Learn .NET and C# with our online courses


► More information:

► Chapters
0:00 Coming up...
0:06 ASP.NET Core logging overview
0:44 How logging works in ASP.NET Core
3:23 Logging providers
5:18 Why logging is important


Watch video .NET logging: Setup, configure and write a log with ILogger (uses .NET Core) online without registration, duration 05 minute 42 second in high hd quality. This video was added by user Round The Code 13 March 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 51 thousand once and liked it 37 people.