From the course: ASP.NET Core: Health Checks and Logging
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Logging to Azure - ASP.NET Core Tutorial
From the course: ASP.NET Core: Health Checks and Logging
Logging to Azure
- [Instructor] If you're hosting your web application on Microsoft Azure, it can make sense to store log entries or log files there are well. Azure has an infrastructure for this and gives us a few options where and how to log, however, before I will discuss this with you, a few words of caution. I'll show you a demo but you need to do several changes so that you can use the code as well. You need to have an Azure account, you need to set up a few things, you have to change the code so that your URLs are now in the code, et cetera, et cetera because the instance in Azure I'm showing you probably will not exist once you see this course. So you have to use your own. But I'll discuss this in more detail once we are in the IDE but before that, let's talk about options. The first option is to just create log files. We can either use the Azure file system or the Azure blob storage. And the name of the file or the…
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
-
-
-
Understanding ILogger<T>1m 48s
-
What's in the template?6m 3s
-
Adding log entries5m 38s
-
Understanding log levels4m 48s
-
Configuring logging7m 40s
-
Logging to files7m 17s
-
Logging to Azure8m 12s
-
Using log scopes4m
-
Challenge: Add logging to the sample app1m 17s
-
Solution: Add logging to the sample app4m 26s
-
Summary of ASP.NET logging1m
-
-