You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cloudnote_sim/config/log.py

22 lines
401 B

4 years ago
import time
from config.config import init
from config.config import logger
start = int(time.time())
init()
def getRunTimeInt():
return (int(time.time()) - start)
def getRunTime():
return '程序已经执行%d' % (int(time.time()) - start)
def writeInfo(msg):
logger.info('%s\t(%s)' % (msg, getRunTime()))
def writeError(msg):
logger.error('%s\t(%s)' % (msg, getRunTime()))