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