Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is ignore_exceptions flag in laravel 8 config/Logging.php under stack channel

Tags:

php

laravel-8

While I was trying to check Project/config/Logging.php option, I came across this code:

'channels' => [
    'stack' => [
        'driver' => 'stack',
        'channels' => ['single'],
        'ignore_exceptions' => false,
    ],

driver and channels options are documented in laravel documentation but I couldnt find any resource for ignore_exceptions option. Can anyone please help me with this?

like image 945
Jitendra Koyande Avatar asked Oct 18 '25 16:10

Jitendra Koyande


1 Answers

It's a way to tell Monolog to ignore child handlers' exceptions, so that application never breaks if log is not writable and the log method fails. Monolog will catch the exception and handle it silently, insuring that app can finish its job, but at the cost that you potentially will loose the information that you wanted to log (depends on your log channels setup).

like image 155
ivanhoe Avatar answered Oct 21 '25 06:10

ivanhoe



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!