diff --git a/composer.json b/composer.json index 05994c9..25c6d9c 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "laravel/ui": "^4.5.0", "laravelcollective/html": "^6.4.1", "league/flysystem": "^3.25.0", + "rap2hpoutre/laravel-log-viewer": "^2.3", "twbs/bootstrap": "5.2.3" }, "require-dev": { diff --git a/composer.lock b/composer.lock index f9c5c10..39ba8fe 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "a8ef8e1a8cc4569e75864f1e869dcb34", + "content-hash": "b08e2f37cdd3c92cbf32d616488c1231", "packages": [ { "name": "brick/math", @@ -3435,6 +3435,69 @@ ], "time": "2023-11-08T05:53:05+00:00" }, + { + "name": "rap2hpoutre/laravel-log-viewer", + "version": "v2.3.0", + "source": { + "type": "git", + "url": "https://github.com/rap2hpoutre/laravel-log-viewer.git", + "reference": "c4148ec364d78be13eb2ab81ce860946bfd91c4c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/rap2hpoutre/laravel-log-viewer/zipball/c4148ec364d78be13eb2ab81ce860946bfd91c4c", + "reference": "c4148ec364d78be13eb2ab81ce860946bfd91c4c", + "shasum": "" + }, + "require": { + "illuminate/support": "4.2.*|5.*|^6.0|^7.0|^8.0|^9.0|^10.0", + "php": ">=5.4.0" + }, + "require-dev": { + "orchestra/testbench": "3.7.*|^7.0", + "phpunit/phpunit": "^7|^9.5.10" + }, + "type": "laravel-package", + "extra": { + "laravel": { + "providers": [ + "Rap2hpoutre\\LaravelLogViewer\\LaravelLogViewerServiceProvider" + ] + } + }, + "autoload": { + "psr-0": { + "Rap2hpoutre\\LaravelLogViewer\\": "src/" + }, + "classmap": [ + "src/controllers" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "rap2hpoutre", + "email": "raphaelht@gmail.com" + } + ], + "description": "A Laravel log reader", + "keywords": [ + "laravel", + "log", + "log-reader", + "log-viewer", + "logging", + "lumen" + ], + "support": { + "issues": "https://github.com/rap2hpoutre/laravel-log-viewer/issues", + "source": "https://github.com/rap2hpoutre/laravel-log-viewer/tree/v2.3.0" + }, + "time": "2023-02-15T07:36:34+00:00" + }, { "name": "symfony/console", "version": "v6.4.4", diff --git a/config/logging.php b/config/logging.php index c44d276..9b92ee8 100644 --- a/config/logging.php +++ b/config/logging.php @@ -58,6 +58,14 @@ return [ 'ignore_exceptions' => false, ], + 'app' => [ + 'driver' => 'single', + 'path' => storage_path('logs/app.log'), + 'level' => env('LOG_LEVEL', 'debug'), + 'replace_placeholders' => true, + ], + + 'single' => [ 'driver' => 'single', 'path' => storage_path('logs/laravel.log'), diff --git a/resources/views/vendor/laravel-log-viewer/log.blade.php b/resources/views/vendor/laravel-log-viewer/log.blade.php new file mode 100644 index 0000000..47245c0 --- /dev/null +++ b/resources/views/vendor/laravel-log-viewer/log.blade.php @@ -0,0 +1,334 @@ + + +
+ + + +Level | +Context | +Date | + @else +Line number | + @endif +Content | +
---|---|---|---|---|
+ {{$log['level']}} + | +{{$log['context']}} | + @endif +{{{$log['date']}}} | +
+ @if ($log['stack'])
+
+ @endif
+ {{{$log['text']}}}
+ @if (isset($log['in_file']))
+ {{{$log['in_file']}}} + @endif + @if ($log['stack']) + + @endif + |
+