pbmengine/pbm-logger

2.0.0 2021-12-10 17:01 UTC

This package is not auto-updated.

Last update: 2024-05-11 04:40:08 UTC


README

Latest Version on Packagist

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.