Article From:https://www.cnblogs.com/cheese320/p/9061279.html
# !/user/bin/python
# -*- coding: utf-8 -*-
'''
subprocess : You need to test shell on the Linux platformLogging'''

import logging
# Output the log in the file
# logging.basicConfig(filename="app.log", level=logging.DEBUG)
logging.basicConfig(filename="app.log",
                    level=logging.WARNING,
                    format='%(asctime)s %(levelname)s  %(filename)s:%(lineno)d  - %(message)s',
                    datefmt='%m/%d/%Y %I:%M:%S %p')  # Time is added to the log.%p stands for pm. TODO. Why didn't she take the number of trips?

 

Leave a Reply

Your email address will not be published. Required fields are marked *