Where is the best place to insert additional logout functionality?
Instead of modifying core, you can implement hook_user() in a custom module. Then you can check the $op parameter to see if it equals "logout". This code will run whenever a user logs out, regardless of what menu item or link they click to log out.



Note that this is different between Drupal 6 and 7. This question was tagged Drupal 6, but if you're using Drupal 7, or plan to later, be aware that this hook was replaced with hook_user_logout().