Output from .net core console app by docker logs

痞子三分冷 提交于 2019-12-19 17:33:46

问题


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


回答1:


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




回答2:


Yes. You can see logs written to stdout and stderr if you use the default logging driver.

By default, docker logs shows the command’s STDOUT and STDERR.

View logs for a container or service



来源:https://stackoverflow.com/questions/48029317/output-from-net-core-console-app-by-docker-logs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!