命令输出写在laravel中的什么地方?

Where does the command output get written in laravel?

我想知道 laravel 计划命令的输出在执行时写入何处

protected function schedule(Schedule $schedule)
{
    $schedule->command('inspire')
             ->hourly();
}

默认情况下它写在任何地方。 Laravel sugested Cronjob 重定向控制台 output to /dev/null.

* * * * * php /path/to/artisan schedule:run >> /dev/null 2>&1

但您可以将控制台输出重定向到文件或通过电子邮件发送:

$schedule->command('foo')
         ->daily()
         ->sendOutputTo($filePath)
         ->emailOutputTo('foo@example.com');

您可以在 Laravel's documentation 上找到更多信息。