diff --git a/app/Console/Commands/Log/ClearLogFile.php b/app/Console/Commands/Log/ClearLogFile.php new file mode 100644 index 0000000..2930888 --- /dev/null +++ b/app/Console/Commands/Log/ClearLogFile.php @@ -0,0 +1,43 @@ + ' . storage_path('logs/laravel.log')); + $this->info('Logs have been cleared'); + } +} diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index 7d3711a..bcdf533 100755 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -15,6 +15,7 @@ class Kernel extends ConsoleKernel 'App\Console\Commands\Inspire', 'App\Console\Commands\DatasetState', 'App\Console\Commands\SolrIndexBuilder', + 'App\Console\Commands\Log\ClearLogFile' ]; /** @@ -30,12 +31,17 @@ class Kernel extends ConsoleKernel // ->withoutOverlapping() // ->appendOutputTo(storage_path('logs/inspire.log')); - // $schedule->command('state:dataset'); - // // ->appendOutputTo(storage_path('logs/inspire.log')); + $schedule->command('log:clear') + ->daily() + ->withoutOverlapping(); + + $schedule->command('state:dataset') + ->daily() + ->withoutOverlapping(); $schedule->command('cache:clear-expired') - ->twiceDaily(1, 16) - ->appendOutputTo(storage_path('logs/cacheClear.log')); + ->twiceDaily(1, 16); + //->appendOutputTo(storage_path('logs/cacheClear.log')); } /**