Skip to main content

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:

  1. In the supervisord configuration file, find the section [supervisord]. The supervisord log-file location is specified by the logfile variable. The log-file location for front-end and back-end services is specified by childlogdir variable.

    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)
  2. Specify the desired log-file locations in the logfile variable and the childlogdir variable. Save your changes to the file.

  3. Restart supervisord to apply the changes:

    service supervisord restart

    Subsequently 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