Download the PHP package label84/laravel-logviewer without Composer
On this page you can find all versions of the php package label84/laravel-logviewer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-logviewer
[!WARNING]
This package is no longer maintained.
We have decided to stop maintaining this package. We don't use this package anymore and don't have the time to maintain this package.
Feel free to fork our code and adapt it to your needs.
Laravel LogViewer
LogViewer enables you to view and filter your Laravel logs in the browser.
- Laravel Support
- Installation
- Usage
- Query filters
- Settings
- Examples
- Tests
- License
Laravel Support
Version | Release |
---|---|
10.x | ^3.0 |
9.x | ^3.0 |
8.x | ^2.1 |
Installation
1. Require package
Add the package to your application.
You can also manually update your composer.json.
2. Publish config file
Add the config file to your application.
2.1 Publish the views (optional)
To change the default views, you can publish the views to your application.
Usage
Visit the following url in your application: /admin/logviewer
You can change the url in the config file.
Query filters
You can filter the logs in the overview with query parameters - example /admin/logviewer?date=today&message=kiss
.
Parameter | Value | Example |
---|---|---|
level= | string | DEBUG |
date= | Carbon | today |
from= | Carbon | yesterday |
till= | Carbon | 2021-01-01 |
logger= | string | local |
message= | string | love |
Settings
To use the package in your own Controllers you can use the following settings. If you use the default package features and views you probably won't need this.
1. Set channel
To dynamically set the channel:
2. Set path
To dynamically set the path:
3. Set file
To dynamically set the file:
4. Available methods
The LogViewerCollection
extends Illuminate\Support\Collection
with the following methods:
- whereLevel(int|string $level)
- whereMinLevel(int|string $level)
- whereMaxLevel(int|string $level)
- whereDate(Carbon|string $date)
- whereDateFrom(Carbon|string $date)
- whereDateTill(Carbon|string $date)
- whereDateBetween(Carbon|string $startDate, Carbon|string $startDate)
- whereLogger(string|array $logger)
- whereMessage(string|array $query)
- whereNotMessage(string|array $query)
- whereUser(int $user)
Examples
Example 1
List all logs.
Example 2
List all logs created today with a minimum level of ERROR.
Example 3
List all logs with a minium level of DEBUG that contains the words 'Foo' and/or 'Bar'.
Levels
Level | |
---|---|
Emergency | 600 |
Alert | 550 |
Critical | 500 |
Error | 400 |
Warning | 300 |
Notice | 250 |
Info | 200 |
Debug | 100 |