Reputation: 5851
It seems that by default, Silex is logging all exceptions and errors. I would like to turn this off, so that the logs contain only the records that I make myself. Is there a way to do this?
Upvotes: 0
Views: 957
Reputation: 41
Just after registering MonologServiceProvider, remove monolog.listener service:
$app->register(Silex\Provider\MonologServiceProvider(), ...);
unset($app['monolog.listener']);
You can also replace monolog.listener service with your own service.
Upvotes: 2
Reputation: 20155
create your own monolog provider by extending the default monolog provider and override the boot method , there is an app->error listener you can remove.
Upvotes: 2