import logging
program = os.path.basename(sys.argv[0])
logger = logging.getLogger(program)
------------------
logging.basicConfig(format='%(asctime)s: %(levelname)s: %(message)s')
logging.root.setLevel(level=logging.INFO)
logger.info("running %s" % ' '.join(sys.argv))
网友评论