logging: change result loglevel also for some seldom methods

This commit is contained in:
Peter Bieringer
2026-04-21 21:21:38 +02:00
parent 0864fd1b31
commit a980a5a353

View File

@@ -354,14 +354,14 @@ class Application(ApplicationPartDelete, ApplicationPartHead,
message = "%s response status for %r%s in %.3f seconds: %s" % (
request_method, unsafe_path, depthinfo,
time_delta_seconds, status_text)
if status < 400:
logger.info(message)
elif status == 401 or status == 404 or status == 412 or status == 409:
logger.notice(message)
logger_method = logger.info # default
if status == 401 or status == 404 or status == 412 or status == 409 or request_method in ["PROPPATCH", "MKCALENDAR", "MKCOL"]:
logger_method = logger.notice
elif status < 500:
logger.error(message)
logger_method = logger.error
else:
logger.critical(message)
logger_method = logger.critical
logger_method(message)
# Profiling end
if self._profiling_per_request: