Integrate ArcaneDev/LogViewer in Jarboe project.
Install package via Composer:
composer require yaro/jarboe-log-viewer
Publish config file and views:
php artisan vendor:publish --provider="Yaro\JarboeLogViewer\ServiceProvider"
In config/logging.php
make sure daily
channel is within channels of stack
log channel, that is used by default in "pure" Laravel application, e.g.:
// config/logging.php
return [
//...
'channels' => [
'stack' => [
'driver' => 'stack',
'name' => 'channel-name',
'channels' => ['daily', 'slack'],
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 7,
],
'slack' => [
'driver' => 'slack',
'url' => env('LOG_SLACK_WEBHOOK_URL'),
'level' => 'critical',
],
//...
];
Optionally, add url to log viewer page in navigation sidebar:
<!-- resources/views/vendor/jarboe/inc/navigation.blade.php -->
<li>
<a href="{{ route('log-viewer::dashboard') }}">
<i class="fa fa-lg fa-fw fa-exclamation-triangle"></i>
<span class="menu-item-parent">Logs</span>
</a>
</li>
Logs can be viewed on log-viewer
under your admin panel prefix, by default it will be http://localhost/admin/log-viewer
.
Look at config/log-viewer.php
for more configuration options.