Liftweb Error Reports by Mail

Having some kind of safety net when something goes wrong is never bad, so today my ass got saved my just a few lines of code (which made this thing much more easier).

So imagine you have a complex actor doing important business calculations (like invoicing), and imagine this one failing at 3 o'clock in the morning. How would you know?

Do you always monitor your error logs? If you go by the let-it-fail principle for example for unauthenticated users, your logs get pretty cluttered after some time. Apply that to a few scenarios where unwanted input or stuff produces stack traces, and you are looking at an unimaginable amount of stacktraces to look through.

So i've written just the simples piece of code i want to share today, since it saved my ass tonight ;)

If you've setup the mailer correctly in your Liftweb-Project, then lines as simple as these could save you a huge amount of trial and error, since you can already define what the subject and message should be.

As i've already said, it's not much, but it's often those little pieces that will save you time and headache.

Flattr me!

Tell your friends!