View Linux Service Logs with Supervisor: Guide
To view service logs with Supervisor, you need to follow the steps below:
- Make sure that you have installed Supervisor. If it is not installed, you can use the following command to install it:
sudo apt-get install supervisor
- Please verify if the log path in the Supervisor configuration file is correct. By default, Supervisor log files are located in the /var/log/supervisor/ directory. You can check the [supervisord] section in the /etc/supervisor/supervisord.conf file and make sure the logfile parameter points to the correct log file path.
- Restart the Supervisor service to apply the configuration changes.
sudo service supervisor restart
- Use the following command to view a list of services managed by Supervisor:
sudo supervisorctl status
- To view the logs for a specific service, use the following command:
sudo supervisorctl tail -f <service_name>
- Copy and Paste
Hope this helps you!