From the course: ASP.NET Core: Health Checks and Logging

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Logging to files

Logging to files - ASP.NET Core Tutorial

From the course: ASP.NET Core: Health Checks and Logging

Start my 1-month free trial

Logging to files

- [Instructor] Logging is not just restricted to the console window or Visual Studio's output window. We can also look to arbitrary targets or sinks as they are called, including files. We could roll our own implementation but there is a kind of defacto standard, the Serilog library for .NET, which allows us to log to a variety of sinks, including the file system. If you go to nuget.org, the homepage of the NuGet Package Manager and have a look at packages, we see that as of now, Serilog is at number five in all of total downloads. That's pretty impressive. So I would say it's a rather safe bet, relying on that external dependency. Having a look at each and every feature of Serilog, is far beyond the scope of this course but I would still like to briefly show you the basics of getting Serilog to work with our application. For that, I would just say I will use the web application and install Serilog there so that we…

Contents