winchester / hd-logger
A laravel package for logging errors,exceptions and information into mysql database table
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
This package is auto-updated.
Last update: 2025-06-25 18:06:01 UTC
README
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