Logging log output module
Import logging
This module is used to print the output format
Logging.basicConfig (level=logging.INFO,format='% (asctime) s% (levelname) s [% (threadName) s] -% (message) s')
Level:
Logging.INFO: log level
Format:
% (asctime) s: print out time
% (levelname) s: print out log level
% (threadName) s: thread name
% (message) s: print out the output message
Print out the output information:
Logging.info ('test')