Check error log is empty

This commit is contained in:
Hillel Coren 2017-08-13 17:43:22 +03:00
parent d2b502f403
commit d1ad78fd84

View File

@ -353,6 +353,13 @@ class AppController extends BaseController
try {
Artisan::call('ninja:check-data');
Artisan::call('ninja:init-lookup', ['--validate' => true]);
// check error log is empty
$errorLog = storage_path('logs/laravel-error.log');
if (file_exists($errorLog)) {
return 'Failure: error log exists';
}
return RESULT_SUCCESS;
} catch (Exception $exception) {
return $exception->getMessage() ?: RESULT_FAILURE;