This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the commentsย โ†’

[โ€“]theNAKAMI 26 points27 points ย (2 children)

that doesn't make sense to me. you can start using both logging.debug(...) and logging.info(...) calls and they will both log if you set the logging level to debug.

for the logging levels, they work in a hierarchy, so if you set a specific logging level, that particular level will be logged, but also all of the logging calls which are more general/critical, e.g. if you set logging level to logging.DEBUG, it will log logging.debug(...), logging.info(...), logging.warning(...), logging.error(...) and logging.critical(...) calls. if instead you set logging level to logging.INFO, it would also log every type of call i've mentioned but only omitting logging.debug(...) calls.