Drupal 6's common.inc
file includes:
// Set the Drupal custom error handler.
set_error_handler('_drupal_error_handler');
If I'm following the logic correctly, this results in all PHP errors going to Watchdog (if enabled).
I'd like to continue using Watchdog (not syslog or similar modules) for everything but PHP errors. PHP errors should go to a file (i.e., the error_log
that is configured in php.ini
).
I'd prefer not to patch Drupal to remove its use of set_error_handler()
, so I'm looking for some ideas. Perhaps I can make my own call to set_error_handler()
in a hook_init()
or settings.php
? Any ideas?