Allow stripping of error messages and warnings in production

Fixes #545 

Hope I didn't miss anything ;)