import logging
logging.basicConfig(format='[%(asctime)s] [%(levelname)s] %(message)s',
datefmt='%Y-%d-%m %I:%M:%S',
level=logging.DEBUG,
handlers=[logging.FileHandler('app.log'), logging.StreamHandler()])