alex-kudrya / laravel-log-viewer
Laravel package for logs exploring.
Requires
- php: >=8.2
- laravel/framework: ^10.0|^11.0
README
Laravel package for logs exploring.
Installation
composer require alex-kudrya/laravel-log-viewer
In app.php
add to providers array \AlexKudrya\LaravelLogViewer\Providers\LogViewerServiceProvider::class
// config/app.php
'providers' => [
...
\AlexKudrya\LaravelLogViewer\Providers\LogViewerServiceProvider::class,
...
]
Publish package config and assets to your app
php artisan vendor:publish --provider=AlexKudrya\LaravelLogViewer\Providers\LogViewerServiceProvider
Strongly recommended to disallow indexing Log Viewer pages for search engines in robots.txt
:
User-agent: *
Allow: /
Disallow: /log-viewer
Congratulations! Log Viewer now allow by this URI - https://[your-host]/log-viewer
Configuration
All configs for Log Viewer located on config/log_viewer.php
route_prefix
- URI for Log Viewer page. By defualt it is equal log-viewer
, means that URL for Log Viewer will be https://{{your_host}}/log-viewer
.
app_title
- Title for your Log Viewer page, located in <head/>
-> <title/>
tag.
middleware
- middleware(s) for Log Viewer route, for example 'auth'
or some else middleware
class, or array of them.
max_display_records
- Maximum number of records which can be displayed. Some logs can contain hundreds of thousands of lines, and it is too many to be displayed in one time. Pagination for log doesn't make sense, so we need to set this limit. By default is 10000
Author
Alexander Kudria alexkudrya91@gmail.com