public static function init(Application $app)
 {
     /** @var \Illuminate\Foundation\Application $app */
     // replace default configurator
     $app->singleton(\Illuminate\Foundation\Bootstrap\ConfigureLogging::class, __CLASS__);
     $app->configureMonologUsing(function ($monolog) {
         $emalAddresses = config('logging.send_to_emails') ?: false;
         $emailSubject = config('logging.email_subject') ?: 'Error report';
         self::configureEmails($monolog, $emalAddresses, $emailSubject);
         $logsFilePath = storage_path('logs/errors.log.html');
         self::configureFileLogs($monolog, $logsFilePath);
     });
 }