../admin/reports/dblog can be filtered to show only "page not found" messages. Providing a "fix via 303 redirect" link on the Details page would be a nice feature. Even better it could analyse the Log and show the top 404 errors.

Comments

dave reid’s picture

Title: dblog (Watchdog) - Add link to "page not found" messages » Add link to add redirect in 'page not found' (404) log entries

The top 404s can already be found at admin/reports/page-not-found with the dblog.module enabled. I like the idea of letting people fix the not founds in the log details, so I'm looking into it.

dave reid’s picture

Status: Active » Postponed

I can't find any easy way to do this yet. I might have to literally use hook_cron() and modify the actual watchdog records. For now I'm setting this as postponed.

mikeytown2’s picture

Another option would be to query the dblog, and create a new item on the menu.

dave reid’s picture

It would seem silly to duplicate the code of the dblog module when I should just be able to make one little alter and have it show up on the dblog pages.

mikeytown2’s picture

Create your own hook_watchdog() that modifies dblog_watchdog(). Inside of pathredirect_watchdog() if $log['type'] == 'page not found' then modify DB entry where everything matches up. Gotta make sure it runs after dblog_watchdog() though.

dave reid’s picture

Would maybe make sense to do these on cron, rather than hook_watchdog() since we'd probably want to avoid another db query on what is potentially a fatal error.

mikeytown2’s picture

Doing it on cron would work

andyf’s picture

Hi, this is a cool idea, did you get any further?

mikeytown2’s picture