alexpts / php-logs-aggregator
Service for lazy logs
0.0.1
2018-04-29 07:09 UTC
Requires
- php: ~7.2
- psr/log: ^1.0
Requires (Dev)
- phpunit/phpunit: ^7.1
This package is auto-updated.
Last update: 2024-12-15 03:03:28 UTC
README
Container for PSR-3 logs
Installation
$ composer require alexpts/php-logs-aggregator
Example
<?php use PTS\LogsAggregator\LogsAggregator; $logger = new LogsAggregator; $logger->emergency('Message 1'); $logger->alert('DB not avaible', ['node' => '127.0.0.1']); $logger->critical('Permission denied', ['userId' => 1, 'uri' => '/admin/settings']); $logger->error('Some error'); ... $logs = $logger->getRecords(); $logger->reset();