How to save the "user agent" in the Drupal logs? when going through the log files it would be really helpful to know if an error was caused by a real user or by a bot.

Is there a way to save the "user agent" string (browser name) to the drupal log?
Using hook_watchdog, you can manipulate all, or some of your log messages. You can find the user agent string in the super-global $_SERVER['HTTP_USER_AGENT']. This way you could for example prepend all "notices" with the user-agent, and all errors with both user-agent and remote IP.