2017 © Pedro Peláez
 

library logger

image

xervice/logger

  • Tuesday, July 31, 2018
  • by mibexx
  • Repository
  • 1 Watchers
  • 0 Stars
  • 77 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Scrutinizer Code Quality Code Coverage, (*1)

Installation

composer require xervice/logger

Configuration

If you want to use the FileLogger, you have to define the path and the filename in your config., (*2)

<?php

use App\Logger\LoggerConfig;

$config[LoggerConfig::LOG_FILENAME] = 'xervice.log';
$config[LoggerConfig::LOG_PATH] = dirname(__DIR__) . '/logs';

In default, there is no action for incoming logs. You can add log handler to handle incoming logs. You can use the default FileLogger. To add a log handler, you can define them in the dependency provider., (*3)

<?php


namespace App\Logger;


use Xervice\Logger\Communication\Plugin\FileHandler\FileLogHandler;
use Xervice\Logger\LoggerDependencyProvider as XerviceLoggerDependencyProvider;

class LoggerDependencyProvider extends XerviceLoggerDependencyProvider
{
    /**
     * @return array
     */
    protected function getLogHandler(): array
    {
        return [
            new FileLogHandler()
        ];
    }
}

It's possible to add multiple log handler. In that case every log is handled by all log handler., (*4)

The Versions

31/07 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram

23/07 2018

1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Mike Bertram