2017 © Pedro Peláez
 

library logger

Additional Logging Classes

image

phlib/logger

Additional Logging Classes

  • Tuesday, February 13, 2018
  • by letssurf
  • Repository
  • 2 Watchers
  • 0 Stars
  • 16,985 Installations
  • PHP
  • 3 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 10 Versions
  • 33 % Grown

The README.md

phlib/logger

Code Checks Codecov Latest Stable Version Total Downloads Licence, (*1)

PHP PSR-3-compatible logger, (*2)

Install

Via Composer, (*3)

``` bash $ composer require phlib/logger, (*4)


## Usage Example config for a logger pool ``` php $loggerConfig = [ 'default' => [ // logger config identifier, used as facility/name in log messages // multiple logger entries becomes a collection logger [ // logger type (stream, gelf...) 'type' => 'stream', // the level of log messages to include (optional) 'level' => \Psr\Log\LogLevel::ERROR, // logger specific parameters 'path' => '/var/log/my_app.log' ], [ 'type' => 'gelf', 'level' => \Psr\Log\LogLevel::INFO, // logger specific parameters 'host' => '127.0.0.1', 'port' => 12201 ] ], 'application' => 'default', // alias to another logger config 'api' => [ 'type' => 'gelf', 'host' => '127.0.0.1', 'port' => 12201 ] ];

Creation of logger pool, (*5)

``` php $loggerPool = new \Phlib\Logger\Pool( new \Phlib\Logger\Config($loggerConfig), new \Phlib\Logger\Factory() );, (*6)


Get a logger instance ``` php $applicationLogger = $loggerPool->getLogger('application'); // or $applicationLogger = $loggerPool->application; $applicationLogger->info('Logging is initialised');

License

This package is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version., (*7)

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details., (*8)

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/., (*9)

The Versions

13/02 2018

dev-master

9999999-dev

Additional Logging Classes

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Martin Price
by Adam Whale

13/02 2018

3.0.1

3.0.1.0

Additional Logging Classes

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Martin Price
by Adam Whale

27/10 2016

3.0.0

3.0.0.0

Additional Logging Classes

  Sources   Download

The Requires

 

The Development Requires

by Martin Price
by Adam Whale

27/10 2016

2.1.1

2.1.1.0

Additional Logging Classes

  Sources   Download

The Requires

 

The Development Requires

by Adam Whale

29/04 2016

2.1.0

2.1.0.0

Additional Logging Classes

  Sources   Download

The Requires

 

The Development Requires

by Adam Whale

21/03 2016

2.0.1

2.0.1.0

Additional Logging Classes

  Sources   Download

The Requires

 

The Development Requires

by Adam Whale

21/03 2016

2.0.0

2.0.0.0

Additional Logging Classes

  Sources   Download

The Requires

 

The Development Requires

by Adam Whale

26/08 2015

1.1.0

1.1.0.0

Additional Logging Classes

  Sources   Download

The Requires

 

The Development Requires

by Adam Whale

25/08 2015

1.0.1

1.0.1.0

Additional Logging Classes

  Sources   Download

The Requires

 

The Development Requires

by Adam Whale

25/08 2015

v1.0.0

1.0.0.0

Additional Logging Classes

  Sources   Download

The Requires

 

The Development Requires

by Adam Whale