I am using supervisord to capture logs from tornado application, all my logs are getting into stderror_logfile. How is supervisor deciding that all logs should go into stderror_logfile. my config looks like below.
stdout_logfile=../../logs/triniti-log.log ; stdout log path, NONE for none; default AUTO
stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
;stdout_events_enabled=false ; emit events on stdout writes (default false)
stderr_logfile=../../logs/stderr-log.log ; stderr log path, NONE for none; default AUTO
stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
stdout_logfile is empty.
Stderr is the default for python's logging module, which Tornado uses (this is also common practice for other logging libraries). Tornado allows you to direct log output to a (series of) files with the --log-file-prefix
command-line argument (if you are using tornado.options.parse_command_line()
, but does not provide any option to use stdout instead.
If you want to use stdout instead of stderr for some reason (note that despite the name, stderr does not imply that any sort of "error" has occurred), you'll have to configure that in Python's logging
module.