diff --git a/app/Http/Controllers/Dashboard/SettingsController.php b/app/Http/Controllers/Dashboard/SettingsController.php index 899501b0aa07..a6c3cc7cf0dc 100644 --- a/app/Http/Controllers/Dashboard/SettingsController.php +++ b/app/Http/Controllers/Dashboard/SettingsController.php @@ -27,6 +27,7 @@ use Illuminate\Support\Facades\Session; use Illuminate\Support\Facades\View; use Illuminate\Support\Str; +use Monolog\Handler\SyslogHandler; class SettingsController extends Controller { @@ -270,11 +271,15 @@ public function showLogView() $log = app(Writer::class)->getMonolog(); - if (file_exists($path = $log->getHandlers()[0]->getUrl())) { - $logContents = file_get_contents($path); - } else { - $logContents = ''; - } + $logContents = ''; + + collect($log->getHandlers())->reject(function ($handler) { + return $handler instanceof SyslogHandler; + })->each(function ($handler) use ($logContents) { + if (file_exists($path = $log->getHandlers()[0]->getUrl())) { + $logContents = file_get_contents($path); + } + }); return View::make('dashboard.settings.log')->withLog($logContents)->withSubMenu($this->subMenu); }