在Docker容器中查找gunicorn日志文件

我有一个使用gunicorn运行python服务的docker容器。服务是这样启动的:

gunicorn --bind 0.0.0.0:6435 --certfile=cert.pem --keyfile=key.pem --ssl-version=5 --ciphers=EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH app:app -w=5 --timeout=500 --daemon

但是,我找不到5个工人的日志文件。查找这些日志文件的默认路径是什么?

我尝试使用查找命令find / -type f -name "hs_err_pid",因为这些是gunicorn用来保存日志文件的默认文件名。但这给了我以下权限错误:

    find: ‘/proc/1/map_files’: Operation not permitted
find: ‘/proc/16/map_files’: Operation not permitted
find: ‘/proc/89/map_files’: Operation not permitted

有什么方法可以找到日志文件?

randy8546 回答:在Docker容器中查找gunicorn日志文件

我建议您将--access-logfile YOUR_FILE添加到命令中以指定文件或使用-将其重定向到stdout。错误日志也是如此。

请参阅this

本文链接:https://www.f2er.com/3145359.html

大家都在问