Render an error if IP is in allowed list or send an email on each error raised or exception thrown in production mode of a deployed symfony application (you should know that something went wrong).
Install the bundle as usual. Enable the bundle in AppKernel for all modes:
<?php $bundles = array( // ... new Ost\ErrorBundle\OstErrorBundle($this), // ... );
Be sure to check that mail sending works with your current configuration. Now edit configuration files:
ost_error: display: ips: ['10.10.10.2', '10.10.10.3']
Here we entered the IP's from which you are allowed to see the warning notifications on the site in production mode (in debug it's converted to exceptions by Symfony).
ost_error: mailer: false display: true
Disabled the mailer in dev mode since you are actually not going to recieve mails on errors while in dev mode.
ost_error: mailer: to: firstname.lastname@example.org from: email@example.com report_not_found: false
Just enter your mail here. And tick the option if you want to recieve notifications