Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It'd be useful for debugging if _autoload_registry_check_code()
watchdogged when an autoload miss occurs. WATCHDOG_NOTICE seems like the appropriate level, since autoload is triggered as part of user-controlled class/interface checking logic (e.g., is_subclass_of(), instanceof etc.) and a miss therefore does not necessarily indicate a critical error.
Note that I've got an issue up against 8.x, which can hopefully also get backported to 7.x: #1091154: Watchdog autoload registry misses with level WATCHDOG_NOTICE
Comment | File | Size | Author |
---|---|---|---|
#16 | watchdog-misses.patch | 397 bytes | te-brian |
#12 | dblog_setting.p0.patch | 1.12 KB | te-brian |
#1 | 1091176-watchdog-autoload-misses-1.patch | 785 bytes | sdboyer |
Comments
Comment #1
sdboyer CreditAttribution: sdboyer commentedPatch attached.
Comment #2
Dave Reiddave@XPS410:~/Dropbox/Projects/drupal6dev/sites/all/modules/autoload$ git am 1091176-watchdog-autoload-misses-1.patch
Applying: Issue #1091176: Watchdog autoload registry misses with level WATCHDOG_NOTICE.
error: autoload.module: does not match index
Patch failed at 0001 Issue #1091176: Watchdog autoload registry misses with level WATCHDOG_NOTICE.
When you have resolved this problem run "git am --resolved".
If you would prefer to skip this patch, instead run "git am --skip".
To restore the original branch and stop patching run "git am --abort".
Comment #3
Dave ReidHrm, apparently that's what happens when I haven't yet authorized git/terminal to use my ssh keys in ubuntu. Once I did that it applied just fine.
Comment #4
Dave ReidCommitted with http://drupalcode.org/project/autoload.git/commit/af10737
Comment #5
sdboyer CreditAttribution: sdboyer commentedAwesome, thanks! Now tagging for a quick deploy...
Comment #6
sdboyer CreditAttribution: sdboyer commentedAnd it's deployed. Man does views do a lot of class_exists().
Comment #7
HongPong CreditAttribution: HongPong commentedCould this have a toggle available to optionally quit chattering? get tons of notices, looks like plenty of various views handlers need patchez,
Comment #8
sdboyer CreditAttribution: sdboyer commentedYeah, I'd tend to agree. I think it's pretty solid for D7 (where everything ought to be autoloading), but it is really chatty for D6, where it's a mixed environment.
Comment #9
HongPong CreditAttribution: HongPong commentedcould the toggle get placed at the tail of some existing admin screen (ie performance)? rather than adding yet another admin URL. [did a workaround with similar]
Comment #10
Gerhard Killesreiter CreditAttribution: Gerhard Killesreiter commentedyeah, this is much too chatty: #1106146: Update Autoload to 6.x-2.1 - fix for chatty watchdog messages on registry misses
Comment #12
te-brian CreditAttribution: te-brian commentedNot sure if this is still desired.. but I made a patch with the requested setting.
It is added to the existing dblog admin settings form.
Comment #13
Dave ReidNote that this isn't database logging - it's using watchdog which doesn't necessarily have anything to do with the database. I'd probably prefer this as a hidden variable, probably disabled by default.
Comment #14
HongPong CreditAttribution: HongPong commentedThis patch is a cool idea to put somewhere though. Anything that can make a big stream of watchdog messages should have a way to dial it back in a logical place. nice!
Comment #15
te-brian CreditAttribution: te-brian commentedI'm more than happy with a hidden var. Will update when I'm at work.
Comment #16
te-brian CreditAttribution: te-brian commentedAs requested: changed to a hidden var that defaults to FALSE.
Comment #17
Dave ReidCommitted #16 with slight modifications to Git.
http://drupalcode.org/project/autoload.git/commit/b563365
Rolled 6.x-2.1 for deployment on d.org.
Comment #18
te-brian CreditAttribution: te-brian commentedGotta love git :)
So nice to be able to easily see your clean-up. I had forgotten about the return value and variable garbage.