Posted by sdboyer on March 13, 2011 at 5:47pm
6 followers
| Project: | Autoload |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
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
Comments
#1
Patch attached.
#2
dave@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".
#3
Hrm, 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.
#4
Committed with http://drupalcode.org/project/autoload.git/commit/af10737
#5
Awesome, thanks! Now tagging for a quick deploy...
#6
And it's deployed. Man does views do a lot of class_exists().
#7
Could this have a toggle available to optionally quit chattering? get tons of notices, looks like plenty of various views handlers need patchez,
#8
Yeah, 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.
#9
could 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]
#10
yeah, this is much too chatty: #1106146: Update Autoload to 6.x-2.1 - fix for chatty watchdog messages on registry misses
#11
Automatically closed -- issue fixed for 2 weeks with no activity.
#12
Not 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.
#13
Note 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.
#14
This 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!
#15
I'm more than happy with a hidden var. Will update when I'm at work.
#16
As requested: changed to a hidden var that defaults to FALSE.
#17
Committed #16 with slight modifications to Git.
http://drupalcode.org/project/autoload.git/commit/b563365
Rolled 6.x-2.1 for deployment on d.org.
#18
Gotta love git :)
So nice to be able to easily see your clean-up. I had forgotten about the return value and variable garbage.
#19
Automatically closed -- issue fixed for 2 weeks with no activity.