我正在使用supervisord来捕获龙卷风应用程序中的日志,我的所有日志都进入了stderror_logfile。主管是如何决定所有日志都进入stderror_logfile的。我的配置如下所示。
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是空的。
发布于 2017-05-26 03:03:38
Stderr是龙卷风使用的python日志模块的默认设置 (这也是其他日志库的常见做法)。龙卷风允许您使用--log-file-prefix命令行参数将日志输出直接指向(一系列)文件(如果您正在使用tornado.options.parse_command_line(),但不提供使用stdout的任何选项)。
如果您出于某种原因想使用stdout而不是stderr (请注意,尽管使用了stderr名称,stderr并不意味着发生了任何类型的“错误”),那么您必须在Python的logging模块中配置它。
https://stackoverflow.com/questions/44131367
复制相似问题