Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dinesh-suthar-winchester/hd-logger
a custom laravel error logger which saves data into mysql table
https://github.com/dinesh-suthar-winchester/hd-logger
custom laravel laravel-logger laravel6 logger logging-facade
Last synced: about 2 months ago
JSON representation
a custom laravel error logger which saves data into mysql table
- Host: GitHub
- URL: https://github.com/dinesh-suthar-winchester/hd-logger
- Owner: dinesh-suthar-winchester
- Created: 2019-10-24T06:05:24.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-25T05:42:29.000Z (about 5 years ago)
- Last Synced: 2024-10-12T11:42:43.461Z (3 months ago)
- Topics: custom, laravel, laravel-logger, laravel6, logger, logging-facade
- Language: HTML
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# hd-logger
a custom laravel error logger which saves data into mysql table# Installation using composer:
`composer require winchester/hd-logger`
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Edit config/app.php:
Add these lines
Service Provider Array:
`Winchester\HdLogger\HdLoggerServiceProvider::class`
Aliases Array:
`'Hdlogger' => Winchester\HdLogger\Facades\HdLoggerFacade::class`
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Database migration:
`php artisan migrate`
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Update app/Exceptions/handler.php
```
use Hdlogger;public function report(Exception $exception)
{
Hdlogger::insertLogger($exception); // Add this line before parent::report($exception)parent::report($exception);
}
```# Log general info in runtime
in your controller class:
```
use Hdlogger;public function controllerMethod()
{
Hdlogger::instant('Log this line in database'); // Example of usage
}
```# View generated logs url
Simply append `/hd-logger` at end of your base url.
Example: `http://localhost:8000/hd-logger`