原创 Python 在 Docker 下如何开启日志输出

Using unbuffered output with

CMD ["python","-u","main.py"] instead of

CMD ["python","main.py"]

-u : unbuffered binary stdout and stderr; also PYTHONUNBUFFERED=x see man page for details on internal buffering relating to '-u'

reference

访客IP ,您的网络 访问优先

本站是个人博客,书写大数据、数据科学等领域的原创学习记录,转载请注明出处

本站运行于 腾讯云 腾讯云