schmidtmilena/laravel-database-logger

Database logger for Laravel 8

2.1.4 2021-02-24 09:01 UTC

This package is auto-updated.

Last update: 2024-03-24 15:37:27 UTC


README

The schmidtmilena/laravel-database-logger package provides custom log handler for Laravel 8 that can store log events to SQL databases.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

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.