OpenVZ does not come with any built-in logging system. Logs are usually managed via the logging infrastructure provided by the host operating system. Here is how you can manage the logs of all the containers in OpenVZ:
1. Syslog: Being a standard for message logging, it allows separation of the software that generates messages, the system that stores them, and the software that reports and analyzes them.
1. You can use “docker logs” command to see the logs of a container but it only works with one container at a time.
1. Rsyslog: It is a high-performance log processing system which provides features such as using TCP for transport, encryption, using any text file as the log destination.
1. Logrotate: A system utility that manages the automatic rotation and compression of log files. It allows automatic rotation, compression, removal and mailing of log files.
1. Elk stack: It provides centralized logging that be useful when attempting to identify problems with servers or applications.
1. Graylog and Loki: They are powerful open-source log management tools.
In addition to the above, there are other open-source and paid tools available for managing and analyzing logs such as Splunk, Loggly, Sumo Logic, etc.
Generally, it is a good practice to log all output to stdout and stderr in your application and then let the docker service automatically handle the logs.
Also, keep in mind that it is easier to manage logs when they are in a centralized location, so having all your logs sent to one place can greatly simplify the process.
It is really up to the system administrator’s discretion to use a particular logging system based on their requirements.