logging.basicConfig(level=logging.DEBUG, format=
    '%(asctime)s %(levelname)-8s %(message)s', datefmt='%Y-%m-%d %H:%M:%S',
    filename=log_file, filemode='a')
How to configure all loggers in an application