Activity Log

The activity log is the place where supervisord logsmessages about its own health, its subprocess’ state changes, anymessages that result from events, and debug and informationalmessages. The path to the activity log is configured via thelogfile parameter in the [supervisord] section of theconfiguration file, defaulting to $CWD/supervisord.log.Sample activity log traffic is shown in the example below. Some lineshave been broken to better fit the screen.

Sample Activity Log Output

  1. 2007-09-08 14:43:22,886 DEBG 127.0.0.1:Medusa (V1.11) started at Sat Sep 8 14:43:22 2007
  2. Hostname: kingfish
  3. Port:9001
  4. 2007-09-08 14:43:22,961 INFO RPC interface 'supervisor' initialized
  5. 2007-09-08 14:43:22,961 CRIT Running without any HTTP authentication checking
  6. 2007-09-08 14:43:22,962 INFO supervisord started with pid 27347
  7. 2007-09-08 14:43:23,965 INFO spawned: 'listener_00' with pid 27349
  8. 2007-09-08 14:43:23,970 INFO spawned: 'eventgen' with pid 27350
  9. 2007-09-08 14:43:23,990 INFO spawned: 'grower' with pid 27351
  10. 2007-09-08 14:43:24,059 DEBG 'listener_00' stderr output:
  11. /Users/chrism/projects/supervisor/supervisor2/dev-sandbox/bin/python:
  12. can't open file '/Users/chrism/projects/supervisor/supervisor2/src/supervisor/scripts/osx_eventgen_listener.py':
  13. [Errno 2] No such file or directory
  14. 2007-09-08 14:43:24,060 DEBG fd 7 closed, stopped monitoring <PEventListenerDispatcher at 19910168 for
  15. <Subprocess at 18892960 with name listener_00 in state STARTING> (stdout)>
  16. 2007-09-08 14:43:24,060 INFO exited: listener_00 (exit status 2; not expected)
  17. 2007-09-08 14:43:24,061 DEBG received SIGCHLD indicating a child quit

The activity log “level” is configured in the config file via theloglevel parameter in the [supervisord] ini file section.When loglevel is set, messages of the specified priority, plusthose with any higher priority are logged to the activity log. Forexample, if loglevel is error, messages of error andcritical priority will be logged. However, if loglevel iswarn, messages of warn, error, and critical will belogged.

Activity Log Levels

The below table describes the logging levels in more detail, orderedin highest priority to lowest. The “Config File Value” is the stringprovided to the loglevel parameter in the [supervisord]section of configuration file and the “Output Code” is the code thatshows up in activity log output lines.

Config File ValueOutput CodeDescription
criticalCRITMessages that indicate a condition thatrequires immediate user attention, asupervisor state change, or an error insupervisor itself.
errorERROMessages that indicate a potentiallyignorable error condition (e.g. unable toclear a log directory).
warnWARNMessages that indicate an anomalouscondition which isn’t an error.
infoINFONormal informational output. This is thedefault log level if none is explicitlyconfigured.
debugDEBGMessages useful for users trying to debugprocess configuration and communicationsbehavior (process output, listener statechanges, event notifications).
traceTRACMessages useful for developers trying todebug supervisor plugins, and informationabout HTTP and RPC requests and responses.
blatherBLATMessages useful for developers trying todebug supervisor itself.

Activity Log Rotation

The activity log is “rotated” by supervisord based on thecombination of the logfile_maxbytes and the logfile_backupsparameters in the [supervisord] section of the configuration file.When the activity log reaches logfile_maxbytes bytes, the currentlog file is moved to a backup file and a new activity log file iscreated. When this happens, if the number of existing backup files isgreater than or equal to logfile_backups, the oldest backup fileis removed and the backup files are renamed accordingly. If the filebeing written to is named supervisord.log, when it exceedslogfile_maxbytes, it is closed and renamed tosupervisord.log.1, and if files supervisord.log.1,supervisord.log.2 etc. exist, then they are renamed tosupervisord.log.2, supervisord.log.3 etc.respectively. If logfile_maxbytes is 0, the logfile is neverrotated (and thus backups are never made). If logfile_backups is0, no backups will be kept.