Home  >  Q&A  >  body text

tomcat - 部署在docker的应用,其输出日志如何查看?

一个web应用部署在包含在tomcat的docker容器,日志默认是输出到tomcat的 logs目录,现在是通过ssh进入容器查看,太不方便了,有没有更好的方法?

怪我咯怪我咯2760 days ago748

reply all(2)I'll reply

  • 阿神

    阿神2017-04-22 09:00:55

    You can try using -v to share the space inside the container to the host and view it directly on the host.

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-22 09:00:55

    Our company has implemented dockerization of all services. Our current plan is to add -v to the startup script, mount the logs of each service to the log directory of the corresponding service folder on the host, and then build a splunk system for viewing , currently working very well.

    reply
    0
  • Cancelreply