Logging your application’s important information
In this section, we will get a general overview of different logging strategies and how to implement an open source Kubernetes-ready solution such as Grafana Loki.
In Chapter 4, Running Docker Containers, we talked about which strategies were available for our applications. As a rule of thumb, processes running in containers should always log standard and error outputs. This makes it easier or at least prepares a good solution for all the processes at the same time. However, your application may need a different logging strategy for different use cases. For example, you shouldn’t log any sensitive information to the standard output. While local logging can be helpful when you are developing your application, it may be very tricky (or even only available for Kubernetes administrators) in a development or production environment. Therefore, we should use either volumes or an external logging ingestion platform. Using volumes...