Reputation: 32028
Using sendOutputTo
in task scheduling, we can store a task output in a file:
$schedule->command('test')->everyMinute()->sendOutputTo(storage_path('test'));
But I don't wan't to store only the last execution, I need a log. How can I log a scheduled task output in a single file?
Upvotes: 6
Views: 3106
Reputation: 445
Isn't appendOutputTo
what you're looking for?
$schedule->command('test')->everyMinute()->appendOutputTo(storage_path('test'));
Upvotes: 17
Reputation: 1
You can use the laravel system logs,
http://laravel.com/docs/5.1/errors#logging
or you can access to Monolog and create your own custom log
this link you can see how to separate the log into multiple files https://laracasts.com/discuss/channels/general-discussion/advance-logging-with-laravel-and-monolog
Upvotes: -1