  import logging

 logging.basicConfig(level=logging.INFO, filename='mylog.log')

 logging.info('Starting program')

 logging.info('Trying to divide 1 by 0')

 pring 1/0
 logging.info('The devision successed')

logging.info('Ending program')
