graze / monolog-extensions
Monolog extensions for use within Graze
Installs: 92 840
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 17
Forks: 3
Open Issues: 4
Requires
- monolog/monolog: ^1.7
Requires (Dev)
- adlawson/timezone: ^1.0
- aws/aws-sdk-php: ^2.4.9|^3.0
- filp/whoops: ^2.0
- graze/standards: ^2
- mindscape/raygun4php: ^1.0
- mockery/mockery: ^0.9
- phpunit/phpunit: ^4.8.36
- sebastian/comparator: >1.2.3
- squizlabs/php_codesniffer: ^3
Suggests
- aws/aws-sdk-php: Write records to AWS services like DynamoDb
- filp/whoops: Handle logs with Whoops handlers
- mindscape/raygun4php: Write records to Raygun.io
This package is auto-updated.
Last update: 2024-10-24 23:15:17 UTC
README
This library supplies additional log handlers, formatters and processors for use with Monolog. The intention is to make use of the library internally with the aim to eventually submit relevant parts to Monolog core.
It can be installed in whichever way you prefer, but we recommend Composer.
$ composer require graze/monolog-extensions
ErrorHandlerBuilder usage
<?php use Aws\DynamoDb\DynamoDbClient; use Graze\Monolog\ErrorHandlerBuilder; $builder = new ErrorHandlerBuilder(); $builder->setName('project-name') ->addHandler(/**$handler**/); $builder->buildAndRegister();
RaygunHandler Usage
<?php use Graze\Monolog\Handler\RaygunHandler; use Monolog\Logger; use Raygun4php\RaygunClient; // Create the client, using the Raygun SDK $client = new RaygunClient('api-key'); // Create the handler $handler = new RaygunHandler($client); // Create the logger $logger = new Logger('project-name', array($handler));
Contributing
We accept contributions to the source via Pull Request, but passing unit tests must be included before it will be considered for merge.
$ make
$ make test
License
The content of this library is released under the MIT License by Nature Delivered Ltd.