Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
103 stars 71 forks source link

Islandora adds a lot of 404 entries to the Drupal log #1812

Open mjordan opened 3 years ago

mjordan commented 3 years ago

Islandora's distributed, asynchronous architecture leaves a lot of 404 entries in the Drupal log. These are mainly (exclusively?) in the form /media/133?_format=jsonld. Requests to the media in question eventually return a 200.

I'd like to propose that we allow admins to filter these messages out of their logs using Drupal's cron. Basically, for all media 404s, some code would confirm that the media does in fact return a 200, and if it does, purge the log database table of the stale 404s. If the check returns a 404, it doesn't remove the entry since that log entry is likely a legitimate 404.

If people think this is a good idea, I'd be happy to take a first crack at this small module. I'm imagining a checkbox somewhere that when checked, does what I describe above.

mjordan commented 3 years ago

2021-05-05 Tech Call consensus: create a module that makes this cron-based log cleanup a toggle-able option. Consider later if we want to roll it into a core Islandora module.

mjordan commented 3 years ago

Working module at https://github.com/mjordan/islandora_log_404_cleaner.