Building a centralized logging system
In the enterprise, managing log files from a large set of domains can soon become a complex task. For this reason, many enterprises turn to centralized logging. As a matter of fact, centralized logging proves to be quite useful when attempting to identify problems, as it allows you to search through all of your logs in a single place. It is also useful because it allows you to spot issues that span multiple application server nodes by correlating their logs during a specific time frame.
In this chapter we have gone through the SocketHandler
, which is a generic approach that lends itself to multiple options, such as collecting logs from a central TCP server. If you need to rely on a more robust solution, then you can consider using the Elasticsearch Logstash Kibana (ELK) Stack, which is an environment that lets you collect and visualize your logs with the following:
Logstash for centralized logging, log enrichment and parsing
Elasticsearch for searching...