Changing the Log-File Location
By default, logs generated by Key Manager Server services are stored under the /tmp directory. The directory where log-files are stored is specified in the supervisord configuration file, which is located at:
/etc/supervisor/supervisord.conf
To change the directory where log-files are stored:
-
In the supervisord configuration file, find the section
[supervisord]. The supervisord log-file location is specified by thelogfilevariable. The log-file location for front-end and back-end services is specified bychildlogdirvariable.The
[supervisord]section of the supervisord configuration file should be similar to the following:[supervisord]logfile=/var/log/supervisor/supervisord.log ;logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)logfile_backups=10 ; (num of main logfile rotation backups;default 10)loglevel=info ; (log level;default info; others: debug,warn,trace)...;nocleanup=true ; (don't clean up tempfiles at start;default false);childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP);environment=KEY=value ; (key value pairs to add to environment);strip_ansi=false ; (strip ansi escape codes in logs; def. false) -
Specify the desired log-file locations in the
logfilevariable and thechildlogdirvariable. Save your changes to the file. -
Restart supervisord to apply the changes:
service supervisord restartSubsequently generated logs are stored under the newly specified locations.
For more information about configuring supervisord logging, please refer to the supervisord documentation at http://supervisord.org