Logging in Microsoft Azure

OK; now that you have seen several solutions for logging in different environments, we will focus on Microsoft Azure. What happens if you take on the role of IT operations, which need to diagnose why an application is not working as expected in Microsoft Azure? What are your choices, and what would be the best solution? That is exactly what you will learn in this section.

If you remember, we have already talked about logging on an application level in Chapter 4, Basic Concepts of ASP.NET Core 3 via a Custom Application: Part 1, of this book. There, we added logging application events to a log file in a logs subfolder of the application folder. This folder needs to be synchronized and monitored for disk space usage because, when it gets too big, it may well become a reason for failure in itself.

Furthermore, there are multiple sources of logs, since application logs and environmental logs (Internet Information Services (IIS), Windows, SQL Server, and so on) are handled separately. You have to combine all the information to get a holistic view of what is happening behind the scenes. This is very complicated and very time-consuming.

As you can see, it requires a lot of manual work to read and analyze application logs in this case. This becomes even more of an issue if you need to monitor and supervise a high number of applications at the same time. Doing everything manually is not really an option. We need to find a better solution.

Moreover, there are better and more integrated solutions in Microsoft Azure! If you deploy your applications in Azure App Service, for instance, you can use the Azure App Service Diagnostics. This feature can be enabled directly from the portal. Additionally, application logs and environmental logs are automatically centralized in a single place, which helps to find problems in a much quicker and more straightforward way.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.150.231