Skip to content

Laravel package to log messages into the database instead of, or in addition to, a file.

License

Notifications You must be signed in to change notification settings

VisualAppeal/LaravelDatabaseLogger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel DatabaseLogger

Laravel package to log messages into a database.

Install

Via Composer

$ composer require visualappeal/databaselogger

Usage

Add the following lines in your config/logging.php:

'db' => [
    'driver' => 'custom',
    'via' => VisualAppeal\DatabaseLogger\DatabaseLogger::class,
    'level' => env('LOG_LEVEL', 'debug'), // Optional
    'connection' => env('LOG_DATABASE', 'mysql'), // Optional
    'table' => env('LOG_TABLE', 'logs'), // Optional
    
    // Encryption requires sodium: https://secure.php.net/manual/en/book.sodium.php
    'encrypt' => env('LOG_ENCRYPT', false), // Optional, encrypt the context part of the log message before inserting it into the database
    'encrypt_key' => env('LOG_ENCRYPT_KEY', env('APP_KEY', '')), // Optional, only used if encrypt is true
],

Database migrations are automatically registered, you only have to call php artisan migrate after installing the package.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

Laravel package to log messages into the database instead of, or in addition to, a file.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages