mardi 15 février 2022

Laravel Logger not Working inside console commands

I am using Laravel Logger(Log::info() to be specific) inside a Console Command and it is not working when it is scheduled (scheduled for two times a day), if i run the command manually as php artisan command-name it is working.

I have already tried php artisan config:clear and php artisan optimize

My app.php :

'log' => env('APP_LOG', 'single'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),

My .env :

APP_LOG_LEVEL=debug

My ide_helper :

'Log' => array(
            'debug'     => 'Monolog\Logger::addDebug',
            'info'      => 'Monolog\Logger::addInfo',
            'notice'    => 'Monolog\Logger::addNotice',
            'warning'   => 'Monolog\Logger::addWarning',
            'error'     => 'Monolog\Logger::addError',
            'critical'  => 'Monolog\Logger::addCritical',
            'alert'     => 'Monolog\Logger::addAlert',
            'emergency' => 'Monolog\Logger::addEmergency',
        )


via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire