2017 © Pedro Peláez
 

library logger

Output logger.

image

czproject/logger

Output logger.

  • Sunday, October 22, 2017
  • by janpecha
  • Repository
  • 1 Watchers
  • 0 Stars
  • 217 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 23 % Grown

The README.md

CzProject\Logger

Become a Patron! Buy me a coffee, (*1)

Installation

Download a latest package or use Composer:, (*2)

composer require czproject/logger

CzProject\Logger requires PHP 5.4.0 or later., (*3)

Usage

``` php use CzProject\Logger; use CzProject\Logger\ILogger;, (*4)

$logger = new Logger\OutputLogger(ILogger::DEBUG); // minimal level $logger->log('Debug info', ILogger::DEBUG); $logger->log('Output', ILogger::INFO); $logger->log('Done!', ILogger::SUCCESS); $logger->log('Warning...', ILogger::WARNING); $logger->log('Error message', ILogger::ERROR); $logger->log('Exception message', ILogger::EXCEPTION); $logger->log('App crashed.', ILogger::CRITICAL);, (*5)


### Loggers * `CzProject\Logger\CliLogger($level, $colored = NULL)` - sends messages to CLI STDOUT * `CzProject\Logger\OutputLogger($level)` - prints messages to STDOUT * `CzProject\Logger\FileLogger($path, $level)` - saves messages into new created file * `CzProject\Logger\MultiLogger()` - sends messages to other loggers ``` php $logger = new Logger\MultiLogger; $logger->addLogger(new Logger\OutputLogger(ILogger::INFO)); $logger->addLogger(new Logger\FileLogger(__DIR__ . '/debug.log', ILogger::DEBUG)); $logger->log($msg, $level);

License: New BSD License
Author: Jan Pecha, https://www.janpecha.cz/, (*6)

The Versions

22/10 2017

dev-master

9999999-dev

Output logger.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0

 

The Development Requires

22/10 2017

v0.10.0

0.10.0.0

Output logger.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0

 

The Development Requires

03/09 2017

v0.9.0

0.9.0.0

Output logger.

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0

 

The Development Requires