replaced app.logger with current_app.logger