Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. logging.basicConfig(filename='log.txt', filemode='w', format='%(asctime)s - %(message)s', level=logging.INFO)
  2. #Creating an object
  3. logger=logging.getLogger()
  4. #Setting the threshold of logger to DEBUG
  5. logger.setLevel(logging.DEBUG)
  6.  
  7. logger.info('Triggered')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement