alexpts/php-logs-aggregator

0.0.1 2018-04-29 07:09 UTC

This package is auto-updated.

Last update: 2024-10-15 02:37:03 UTC


README

Build Status Code Coverage Code Climate Scrutinizer Code Quality

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();