Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import logging
- #configuration of the logger
- logging.basicConfig(
- level=logging.DEBUG,
- format='%(asctime)s - %(levelname)s - %(message)s')
- #log a message
- logging.debug(
- 'start of program %s, with input'
- % (name, inputVal))
- #disale the logging under the level in input
- logging.disable(logging.CRITICAL)
- #configuration of the logger, with output in log file
- logging.basicConfig(
- filename='logfile.log',
- level=logging.DEBUG,
- format='%(asctime)s - %(levelname)s - %(message)s')
Advertisement
Add Comment
Please, Sign In to add comment