flask-rest-jsonapi icon indicating copy to clipboard operation
flask-rest-jsonapi copied to clipboard

Is there a hook to record logs when the status code is 500?

Open ShakeM opened this issue 5 years ago • 1 comments

I am trying to record all 500 response in my production environment. Is there a way to record all of them without DEBUG = True ?

ShakeM avatar Mar 30 '19 10:03 ShakeM

I would like to see this alongside with a similar approach for JsonApiExceptions, since I can't find a way to log them. Would it be a good idea to make some sort of special parameter (maybe a configuration one, but different from DEBUG) in order to let the developers to raise or not to raise JsonApiExceptions? I mean, we could search for something like JSONAPI_EXCEPTIONS_RAISE with a default value of False, or some similar approach If I can help in anyway, please let me know. Nice work!

fgiraldi avatar May 20 '19 14:05 fgiraldi