With page cache enabled, some accesslog & watchdog logging is inaccurate

Created on 21 February 2009, over 15 years ago
Updated 1 April 2024, 7 months ago

Now that #318102: hook_exit() not invoked for some cached requests β†’ is fixed, all page requests that are served from Drupal's page cache, or that receive a 304 header response, get logged if statistics module's access log is enabled. :-)

However the page's title is not available to http://api.drupal.org/api/function/statistics_exit, so this field will be blank in {accesslog}.

Also if the request results in a 403 or 404 response then:
1) the path will not be recorded correctly (what gets recorded is the (internal) path that caused the 403 or 404; after a full bootstrap, the internal path of the 403 or 404 page is recorded instead)
2) the "page not found" or "access denied" message won't be recorded in {watchdog}. Though fixing this might cause a performance hit on high traffic sites.

These anomalies make detailed log analysis difficult.

I've not checked in detail but I suspect the behaviour is the same on 6.9 and 7.x.

πŸ› Bug report
Status

Active

Version

7.0 ⚰️

Component
StatisticsΒ  β†’

Last updated 3 days ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom gpk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024