Edgewall Software

Opened 9 years ago

Last modified 9 years ago

#12016 closed enhancement

Use lower logging level for "HTTPNotFound" — at Version 1

Reported by: Ryan J Ollos Owned by:
Priority: normal Milestone:
Component: general Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

Similar to #12005, I wonder whether there is value to the administrator in logging HTTPNotFound at WARNING level. It seems more like noise to me, and makes it difficult to spot real issues in the log file.

2015-04-01 23:09:50,441 Trac[main] WARNING: [178.255.215.93] HTTPNotFound: 404 Trac Error (No version "1" for Wiki page "nori")

Perhaps we should use a lower logging level, such as DEBUG or INFO.

The sequence of events is:

  1. ResourceNotFound error raised.
  2. ResourceNotFound trapped and HTTPNotFound raised: tags/trac-1.0.5/trac/web/main.py@:261#L259
  3. HTTPNotFound trapped and logged: tags/trac-1.0.5/trac/web/main.py@:518,527#L501

We could simply inspect the error code when determining how to log the error in _send_user_error. Similarly, HTTPForbidden could be logged at DEBUG level. HTTPInternalError could still be logged at WARNING level.

How should HTTPBadRequest be logged? Should all 4xx error codes be logged at DEBUG or INFO level?

Change History (1)

comment:1 by Ryan J Ollos, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.