pbmengine / pbm-logger
PBM Logger
2.0.0
2021-12-10 17:01 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^6.3|^7.0
- illuminate/support: ^5.7|^6.0|^7.0|^8.0
- monolog/monolog: ^1.0|^2.0
- symfony/http-foundation: ^3.3|^4.1|^5.0
- symfony/var-dumper: ^3.4|^4.0|^5.0
Requires (Dev)
- mockery/mockery: ^1.4
- phpunit/phpunit: ^9.5
README
Intro
This package needs a Laravel application. It provides a logging channel to log exceptions and messages to PBM Monitoring System.
Installation
You can install the package via composer:
composer require pbmengine/pbm-logger
Usage
Add the following channel in your Laravel logging.php file:
// config/logging.php 'channels' => [ // ... 'stack' => [ 'driver' => 'stack', 'channels' => ['pbm', 'daily'], 'ignore_exceptions' => false, ], 'pbm' => [ 'driver' => 'custom', 'via' => Pbmengine\Logger\LogFactory::class, 'anonymize_ips' => true, 'api_endpoint' => '<your endpoint>/api/reports', 'api_key' => env('PBM_LOGGER_KEY'), 'level' => Monolog\Logger::DEBUG, ], // ... ]
Add the PBM_LOGGER_KEY
to your .env file.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email stefan@sriehl.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.