Writing log messages to the logging server
In the modern cloud environment, there are multiple instances of the same application running on different servers. Due to the distributed nature of the cloud environment, it will be hard to keep track of the different logs produced by the different application instances. This will require using a centralized logging system that will be able to capture all the different log messages from the different applications and systems.
For our needs, we will build our own logging server to capture all log messages in one single place; the code can be found at https://github.com/PacktPublishing/Full-Stack-Web-Development-with-Go/tree/main/logserver. The logging server will be a central place that will collate log information from our application, which will help in troubleshooting when our applications are deployed in a cloud environment. The downside of having a central logging server is that when the logging server goes down, we have no visibility...