11 Logging and health checks
This chapter covers:
- Why you need to log within your web applications and use monitoring
- How ASP.NET Core health checks work
- Adding a UI to display the application state, based on the health checks
- An introduction to the ASP.NET Core logging system
- Identifying which target systems can be used for log entries
So far, this book has attempted to make sure that an application is secure, and that all attacks are futile. In theory, our web sites are now in a good shape. But, as the famous saying goes: in theory there is no difference between theory and practice, while in practice there is (incorrectly attributed to Albert Einstein, but Benjamin Brewster coined that first, in 1882[1]). Something will always go wrong, eventually, and the application needs to be prepared for that. Note that this is the first chapter in the book that does not start with a specific attack or case study. Instead, the topics covered here are an important ingredient to a holistic security strategy, without specific attacks assigned to them. This trend will continue throughout the remainder of the book.