Closed scypio closed 6 years ago
Thank you @scypio for this fix.
Would it be possible to add information about requested resource while logging response? The issue I have is that it makes no sense in some cases to log every request, however it is good to know what resource was requested if there was >= 400 response code.
What do you think about adding request path (especially in warn and error level) in the message? I think that might be useful.
@Skejven @mateuszgrab-cognifide I added request URL logging for 4xx, 5xx response codes
…rect and error responses
Currently every response from repository that return HTTP status code different than 200 is logged using ERROR logger level. The strategy has been adjusted.
Description
2xx - success - log at debug 3xx - redirect - log at info 4xx - client error - log at warn 5xx - server error - log at error other - log at warn
https://github.com/Cognifide/knotx/issues/423
Motivation and Context
Too many error messages may trigger unwanted warnings for devops. Error log level should indicate that something is wrong.
Screenshots (if appropriate):
Types of changes
Checklist:
I hereby agree to the terms of the Knot.x Contributor License Agreement.