Answer the question
In order to leave comments, you need to log in
How to organize the output of auxiliary information to the console in the application?
I would like to display information about the current state of script execution to the console, but a large number of print in functions pretty much spoil, in my opinion, readability, and indeed the structure in general. Where to dig?
Answer the question
In order to leave comments, you need to log in
import logging
logger = logging.getLogger(__name__)
logger.info('log message')
more details here:
https://docs.python.org/2/howto/logging.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question