Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
5661 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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)

Imagine profil
Abandonează
Autor Cel mai bun răspuns

Hi Marcelo,

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
feb. 23
2537
0
mai 22
2358
1
iun. 23
4762
1
nov. 22
7553
1
iun. 25
1966