Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
5493 Zobrazení

Hi,


I am working on setting up a development environment with Docker. When I use the print() method in a class method nothing gets actually printed anywhere (that I can find at least).


I've seen it work in videos on Youtube so I assume this si possible. Any clue how to make this work with a Docker setup?


Thanks!


Guillaume

Avatar
Zrušit
Nejlepší odpověď

Try to use the logger.
import logging

_logger = logging.getLogger(__name__)

and then in your code you can use:
_logger.info(YOUR_STRING_OR_VARIABLE)

Avatar
Zrušit
Autor Nejlepší odpověď

Hi Marcelo,

Thanks a lot for your answer. This does work. I just thought it's a bit overkill to do a quick debugging.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
úno 23
2395
0
kvě 22
2223
1
čvn 23
4579
1
lis 22
7273
1
čvn 25
1619