qlimix/logging-exception-handler

2.0.0 2020-04-19 12:26 UTC

This package is auto-updated.

Last update: 2024-05-07 02:34:24 UTC


README

Travis CI Coveralls Packagist MIT License

Logging exceptions.

Install

Using Composer:

$ composer require qlimix/logging-exception-handler

usage

<?php

use Qlimix\Log\Logger\Exception\ExceptionLogger;
use Exception;

$logHandler = new FileLogHandler();
$logger = new ExceptionLogger($logHandler);

$logger->emergency('foo', new Exception());
$logger->critical('foo', new Exception());
$logger->alert('foo', new Exception());
$logger->error('foo', new Exception());
$logger->debug('foo', new Exception());

Testing

To run all unit tests locally with PHPUnit:

$ vendor/bin/phpunit

Quality

To ensure code quality run grumphp which will run all tools:

$ vendor/bin/grumphp run

Contributing

Please see CONTRIBUTING for details.