schmidtmilena / laravel-database-logger
Database logger for Laravel 8
Fund package maintenance!
schmidtmilena
Requires
- php: ^7.4|^8.0
- illuminate/contracts: ^8.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.3
- vimeo/psalm: ^4.4
README
The schmidtmilena/laravel-database-logger package provides custom log handler for Laravel 8 that can store log events to SQL databases.
Installation
You can install the package via composer:
composer require schmidtmilena/laravel-database-logger
You can publish and run the migrations with:
php artisan vendor:publish --tag=migrations
Usage
After publishing migration run:
php artisan migrate
Add custom driver to your logging.php file:
'channels' => [ 'stack' => [ 'driver' => 'stack', 'channels' => ['mysql'], ], // [...] 'mysql' => [ 'driver' => 'monolog', 'via' => SchmidtMilena\DbLogger\Monolog::class, 'handler' => SchmidtMilena\DbLogger\DbLoggerHandler::class, 'formatter' => SchmidtMilena\DbLogger\Formatter::class, 'name' => 'mysqllogger' ],
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.