python:logging
This is an old revision of the document!
Logging
import logging
Logging with getLogger() ar arranged by names. getLogger('father.son.grandson') will use the father log so to say.
To file
import logging logging.basicConfig(filename='example.log', encoding='utf-8', level=logging.DEBUG) logging.debug('This message should go to the log file')
python/logging.1628242741.txt.gz · Last modified: 2022/09/12 00:30 (external edit)
