Edgewall Software
Modify

Opened 10 years ago

Closed 9 years ago

#12016 closed enhancement (wontfix)

Use lower logging level for "HTTPNotFound"

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?

Attachments (0)

Change History (4)

comment:1 by Ryan J Ollos, 10 years ago

Description: modified (diff)

comment:2 by Jun Omae, 10 years ago

Most of web servers, e.g. Apache, Nginx, …, log such messages with error level.

[Thu Apr 02 14:56:59 2015] [error] [client 192.168.11.18] File does not exist: /var/www/html/apple-touch-icon-precomposed.png

I think that is a general behavior and no need to change the level of logging….

In #12005, I suppose the auto-preview with unfinished text almost leads the noisy messages while editing ticket comment. I consider we should use a lower level.

comment:3 by Ryan J Ollos, 10 years ago

Milestone: 1.0.6undecided

Thanks, you are probably right. Let me think about it a bit more before closing the ticket.

comment:4 by Ryan J Ollos, 9 years ago

Milestone: undecided
Resolution: wontfix
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none) to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.