简体   繁体   English

从容器内部查看容器日志

[英]View container logs from inside container

我知道从主机检查/var/lib/docker/containers/<containerid>-json.log的方法(包括映射此卷),并通过docker client API,但是还有其他方法可以从容器内部查看日志?

If your image runs a non-interactive process such as a web server or a database, that application may send its output to log files instead of STDOUT and STDERR. 如果映像运行的是非交互过程,例如Web服务器或数据库,则该应用程序可能会将其输出发送到日志文件,而不是STDOUT和STDERR。

*** If you use a logging driver which sends logs to a file, an external host, a database, or another logging back-end you may not see the logs. ***如果使用的日志记录驱动程序将日志发送到文件,外部主机,数据库或其他日志记录后端,则可能看不到日志。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM