import logging

logging.basicConfig(filename='logging_she.log', level=logging.INFO, format='%(asctime)s -- %(name)s -- %(levelname)s -- %(message)s')

with open('equations.txt', 'r') as txt_file:
    read = txt_file.readlines()
    
    for line in read:
        try:
            res = eval(line)
            logging.info(res)
        except Exception as error:
            logging.error(error)
