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 - ASP.NET Core Tutorial
From the course: ASP.NET Core: Health Checks and Logging
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
(Locked)
Understanding ILogger<T>1m 48s
-
(Locked)
What's in the template?6m 3s
-
(Locked)
Adding log entries5m 38s
-
(Locked)
Understanding log levels4m 48s
-
(Locked)
Configuring logging7m 40s
-
(Locked)
Logging to files7m 17s
-
(Locked)
Logging to Azure8m 12s
-
(Locked)
Using log scopes4m
-
(Locked)
Challenge: Add logging to the sample app1m 17s
-
(Locked)
Solution: Add logging to the sample app4m 26s
-
(Locked)
Summary of ASP.NET logging1m
-
(Locked)
-