Feature Request: Log to email

In an ideal world a production site is perfect but due to differences in data, users, traffic, etc there are times when you'll get an exception thrown.

You can't leave a production site in debug mode but it COULD be possible to email a debug stack trace to an email address or at the bare minimum the log entry which is somewhat less useful but still handy information.

Can we please at least allow some (or user-defined) log levels to email a given address, perhaps emergency log levels could send a stack trace page on exceptions.

This has the dual benefit of real-time error notifications and meaningful debug data instead of relying on user reports or continually checking the log page in reports.

View Replies:
JohntheFish replied on at Permalink Reply
The core supports custom log handlers, so if you can find an 'email' handler for monolog you can plug it in.

This list includes a few email handlers
surefyre replied on at Permalink Reply
Thanks John, that's likely fine for me though for the many people who this might be technically beyond I think it would be a very useful, perhaps important, feature to have out of the box?

It might not be their own code - they might not really code at all - causing an exception, a third party plugin perhaps, then they could at least disable it while they seek an alternative or file a bug report for it knowing that it was chucking errors. Otherwise they're relying on visitors reporting the problem. I know I don't bother doing that, I just go to the next site in Google.

At least I have a starting point for my needs though, thanks again for that.
A3020 replied on at Permalink Reply
I think it'd be a bad idea if concrete5 would send those emails. See for example this issue I came across yesterday:https://github.com/concrete5/concrete5/issues/7350... It raises an emergency level error (500), hundreds of times.

I usehttp://centry.nl for centralized logging. It basically sends all log entries to a central portal instance where they can be filtered / searched.

For real-life debugging purposes I'd recommend Bugsnag. It bundles application events automatically). For this I use https://www.concrete5.org/marketplace/addons/bugsnag-integration/...