4

I want Drupal send me watchdog logs by emails.
I found Logging and alerts 7.x.
But it sends every alert/warning etc. log in a seperate email.
But i want it to gather that entries and send emails.
For example 50-60 entry in an email.

Is it possible by using these settings in that module:
- Maximum number of allowed consecutive similar email alerts
- Email alerts should be considered "consecutive" if sent within

Or should i use something else?
Thank you

2 Answers 2

3

Create a module that implements hook_watchdog(). You could have your own cache of log entries and send a digest of them once a day, or whatever policy you like.

1
  • 1
    hook_watchdog() is only triggered when a call to watchdog is made. So if you have code that caches them and reports when the latest call is a day after the earliest cached one, but there are no more calls to watchdog, you would never be alerted to the problem! If you're going to write code for this, I'd suggest hook_cron() would be better, then just filter the messages you want, and if any found, summarise and send. Commented Apr 14, 2014 at 10:24
0

There's a module called Watchdog Digest that seems (to aspire) to do exactly that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.