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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

sdboyer’s picture

Patch attached.

Dave Reid’s picture

Status: Active » Needs work

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".

Dave Reid’s picture

Status: Needs work » Reviewed & tested by the community

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.

Dave Reid’s picture

Status: Reviewed & tested by the community » Fixed
sdboyer’s picture

Issue tags: +needs drupal.org deployment

Awesome, thanks! Now tagging for a quick deploy...

sdboyer’s picture

Issue tags: -needs drupal.org deployment

And it's deployed. Man does views do a lot of class_exists().

HongPong’s picture

Could this have a toggle available to optionally quit chattering? get tons of notices, looks like plenty of various views handlers need patchez,

sdboyer’s picture

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.

HongPong’s picture

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]

Gerhard Killesreiter’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

te-brian’s picture

Status: Closed (fixed) » Needs review
FileSize
1.12 KB

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.

Dave Reid’s picture

Status: Needs review » Needs work

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.

HongPong’s picture

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!

te-brian’s picture

I'm more than happy with a hidden var. Will update when I'm at work.

te-brian’s picture

Status: Needs work » Needs review
FileSize
397 bytes

As requested: changed to a hidden var that defaults to FALSE.

Dave Reid’s picture

Status: Needs review » Fixed

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.

te-brian’s picture

Gotta love git :)

So nice to be able to easily see your clean-up. I had forgotten about the return value and variable garbage.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.