poem
poem copied to clipboard
Tracing middleware with individual levels
Greetings,
I currently explore the features of poem and got a bit puzzled about the Tracing middleware.
I wondered why all the errors of my Endpoints were displayed on the info level, when looking at the source of Tracing I found that lines 41, 61 and 69 hardcode the log level to info.
Is this intentional or would it be appropriate to extend the middleware to reflect the correct log levels?
Even though, the log correctly states that the message originates from an error I find it hard to read.
For example: INFO request{remote_addr=127.0.0.1 version=HTTP/1.1 method=POST uri=/api/v1/file/upload}: poem::middleware::tracing_mw: error status=500 Internal Server Error error=Das System kann die angegebene Datei nicht finden. (os error 2) duration=1.8177ms
Should be: ERROR request{remote_addr=127.0.0.1 version=HTTP/1.1 method=POST uri=/api/v1/file/upload}: poem::middleware::tracing_mw: error status=500 Internal Server Error error=Das System kann die angegebene Datei nicht finden. (os error 2) duration=1.8177ms
Thank you!