Docker日志从.net核心控制台应用程序输出 [英] Output from .net core console app by docker logs

查看:472
本文介绍了Docker日志从.net核心控制台应用程序输出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否应该使用docker logs命令从.net核心控制台应用程序的控制台输出(Console.WriteLine)Dockerized(Linux映像)?

Should I see console output (Console.WriteLine) from .net core console app dockerized (linux image) by using docker logs command?

推荐答案

发现,在调试模式下,应用程序仅写入调试输出控制台.因此,如果您在本地调试容器上运行docker logs,将一无所获.如果以发布模式运行容器,则在运行docker logs

Found out that in debug mode the app only writes to the debug output console. So if you run docker logs on a local debugging container there will be nothing. If you run the container in release mode then the logs will be present when running a docker logs

这篇关于Docker日志从.net核心控制台应用程序输出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆