Let's talk logging

Logging was one of the biggest things I had to adjust to in Azure. I was so used to being able to dig things out of a server that it was like second nature.  The first time I had to dig things out of Azure due to poor logging, I went cross-eyed staring at the log stream.  So, I adopted NLog because I liked how configurable it was and that it followed my DI pattern.  I also learned how to use it for informational purposes, because in Azure you want to ensure your application can self-heal and/or fails gracefully, allowing developers code swallowing errors and moving on, is a bad practice.  You can read the documentation on NLog at https://nlog-project.org/ and install the NuGet package with this:

install-package Microsoft.ApplicationInsights.NLogTarget ...

Get Hands-On Cloud Solutions with Azure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.