timrutte/laminas-log-writer-sentry

Log writer to send all logs to Sentry

v1.0 2023-02-24 20:55 UTC

This package is auto-updated.

Last update: 2024-04-24 23:25:26 UTC


README

Installation

Run the following to install this library:

$ composer require timrutte/laminas-log-writer-sentry

Usage

$writer = new \TimRutte\Laminas\Log\Writer\Sentry();
$writer->configureSentry(
    '<SENTRY_DSN>', 
    '<ENVIRONMENT>',
    '<MIN_LOG_LEVEL>' 
);
$formatter = new \Laminas\Log\Formatter\Json();
$writer->setFormatter($formatter);
$logger = new \Laminas\Log\Logger();
$logger->addWriter($writer);

Support