lundi 3 juillet 2017

Laravel Log Facade Not Working Inside Scheduler Commands

I'm trying to log my various scheduled jobs to papertrail. Everywhere else in my app if I use: Log::info('whatever') I will see this in papertrail. For some reason I can't get Log, echo, or a few other things to log within the job. They will fire outside of the various commands though:

protected function schedule(Schedule $schedule)
{

    Log::info('THIS WORKS'); // this works for some reason

    $schedule->call(function(){
        Log::info('this will never make it anywhere');
        echo 'this will not show up either';
    })->everyMinute();

    ...
}



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire