from flask import request, current_app, Response from flask_classful import FlaskView class LogView(FlaskView): def post(self): current_app.logger.info(f"New message: {request.json['message']}") return Response(status = 204)