Flask uses standard Python logging. All Flask-related messages are logged under the 'flask' logger namespace. Flask.loggerreturns the logger named 'flask.app', and can be used to log messages for your application. @app.route('/login', methods=['POST'…
在celery和flask框架中都有自带的logger使用方法.下面记录一下相关的使用. flask中使用logger flask中的app对象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 i…