Demo
import logging
import sys
logging.basicConfig(filename='./test.log', filemode='a', level=logging.INFO,
format='%(asctime)s %(message)s', datefmt='%H:%M:%S')
logger = logging.getLogger()
logger.addHandler(logging.StreamHandler(sys.stdout))
logger.info('this is a test log')