The watchdog messages that log geocoding errors are helpful to assist in figuring out what type of errors we are getting. What would be helpful is a link in the watchdog entry that points to the entity that contains the field that caused the error. This would be very helpful in determining what entities have bad addresses, for example.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mpgeek’s picture

Status: Active » Needs review
FileSize
1.4 KB

Here is a patch that adds the link on the watchdog message detail page. Note that the google handler was double-wrapped in a try-catch block, so we had to change that to a re-throw to let the widget actually handle the exception.

mpgeek’s picture

Here is a cleaner patch, some debug code was removed.

mpgeek’s picture

Gah. One more time, as field_collections are throwing warnings.

  • Pol committed 58190c9 on 7.x-1.x authored by mpgeek
    Issue #2221663 by mpgeek: Add a link to offending entity in watchdog...
Pol’s picture

Status: Needs review » Fixed

Thanks! It's in now.

  • Pol committed 58190c9 on 7.x-2.x authored by mpgeek
    Issue #2221663 by mpgeek: Add a link to offending entity in watchdog...

  • Pol committed 58190c9 on 8.x-2.x authored by mpgeek
    Issue #2221663 by mpgeek: Add a link to offending entity in watchdog...

Status: Fixed » Closed (fixed)

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

AdamPS’s picture

Unfortunately this check-in seems to have broken #2408693: Handle not every Exception as a watchdog error

The Google code is carefully specifying different severity levels and now they are being ignored and it always uses WARNING (in the widget) or ERROR (in function geocoder).

Yandex also catches its own exceptions and that code was left in place. This is good in that yandex exception severity levels weren't broken, but presumably bad in that this fix isn't applied to yandex.

In fact errors and exceptions all seem to be a bit muddled right now - I've raised a new issue #2689211: Confusion with errors and logging.