how to view log output when developing in Visual Studio code's Remote Container

守給你的承諾、 提交于 2019-12-24 19:13:59

问题


I have a django (web) - celery - redis - postgresql (db) project that uses docker.

If I run the project with docker-compose up I get the expected logs in the terminal:

redis_1        | 1:M 28 Jul 2019 17:13:32.765 * Ready to accept connections
db_1           | LOG:  database system was interrupted; last known up at 2019-07-28 17:06:03 UTC
...
db_1           | LOG:  autovacuum launcher started
celery_1       |  
celery_1       |  -------------- celery@c044cee5822e v4.3.0 (rhubarb)
celery_1       | ---- **** ----- 
...

However if I use the Remote - Containers extension to develop within the container, I don't see the log output, I just see:

*
* Visual Studio Code Server
*
* Reminder: You may only use this software with Visual Studio family products,
* as described in the license https://aka.ms/vscode-remote/license
*


IP Address: 172.21.0.5
webview server listening on 33975
Extension host agent listening on 46737
Run: docker exec -w /home/appuser/.vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529 f51bf56e2448dedbc0ac9070ecb1144b9425f72829450ca9f8364e31badb8260 /bin/sh -c echo 46737 >.devport


------------------------
Published Ports:
8000/tcp -> 0.0.0.0:8000
------------------------

==> Received an extension host connection.
==> Using UI language: en
==> Received a management connection
==> Received a management connection

How do I view/open the normal outputs of my containers while using this extension?

来源:https://stackoverflow.com/questions/57243350/how-to-view-log-output-when-developing-in-visual-studio-codes-remote-container

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