flask中自带的logger日志工具
flask自带logger方法(日志工具),使用格式为
from flask import current_app
current_app.logger.error(‘this is a error’)
current_app.logger.info(‘this is a info’)
current_app.logger.warning(‘this is a wraning’)
current_app.logger.debug(‘this is a debug’)
也可使用app.logger.error(‘asdf’),当使用app调用出错时,可使用current_app.logger