2017 © Pedro Peláez
 

magento2-module mage2_ext_logging

Monolog Cascade integration to Magento 2.

image

praxigento/mage2_ext_logging

Monolog Cascade integration to Magento 2.

  • Friday, December 1, 2017
  • by praxigento
  • Repository
  • 3 Watchers
  • 6 Stars
  • 2,526 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 4 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Monolog Cascade integration to Magento 2

Build Status Coverage Status, (*1)

Installation

Add to your project's composer.json:, (*2)

  "require": {
    "praxigento/mage2_ext_logging": "~0.1"
  }

Usage

Default configuration file is in var/log/logging.yaml (see src/etc/di.xml)., (*3)

Get logger with ObjectManager:, (*4)

public function __construct(
    \Psr\Log\LoggerInterface $logger,
    ...
) {
    $this->_logger = $logger;
    ...
}

Then log your messages:, (*5)

$this->_logger->info("'Get account' operation is called.");

Configuration sample

disable_existing_loggers: true
formatters:
    dashed:
        class: Monolog\Formatter\LineFormatter
        format: "%datetime%-%channel%.%level_name% - %message%\n"
handlers:
    debug:
        class: Monolog\Handler\StreamHandler
        level: DEBUG
        formatter: dashed
        stream: /.../var/log/cascade_debug.log
    system:
        class: Monolog\Handler\StreamHandler
        level: INFO
        formatter: dashed
        stream: /.../var/log/cascade_system.log
    exception:
        class: Monolog\Handler\StreamHandler
        level: EMERGENCY
        formatter: dashed
        stream: /.../log/cascade_exception.log
processors:
    web_processor:
        class: Monolog\Processor\WebProcessor
loggers:
    main:
        handlers: [debug, system, exception]
        processors: [web_processor]

The Versions

01/12 2017

dev-master

9999999-dev https://github.com/praxigento/mage2_ext_logging

Monolog Cascade integration to Magento 2.

  Sources   Download

MIT

The Requires

 

by Alex Gusev

01/12 2017

0.1.3

0.1.3.0 https://github.com/praxigento/mage2_ext_logging

Monolog Cascade integration to Magento 2.

  Sources   Download

MIT

The Requires

 

by Alex Gusev

28/09 2017

0.1.2

0.1.2.0 https://github.com/praxigento/mage2_ext_logging

Monolog Cascade integration to Magento 2.

  Sources   Download

MIT

The Requires

 

by Alex Gusev

26/04 2016

0.1.1

0.1.1.0 https://github.com/praxigento/mage2_ext_logging

Monolog Cascade integration to Magento 2.

  Sources   Download

MIT

The Requires

 

by Alex Gusev

17/02 2016

0.1.0

0.1.0.0 https://github.com/praxigento/mage2_ext_logging

Monolog Cascade integration to Magento 2.

  Sources   Download

MIT

The Requires

 

by Alex Gusev

12/02 2016

0.0.1

0.0.1.0 https://github.com/praxigento/mage2_ext_logging

Monolog Cascade integration to Magento 2.

  Sources   Download

MIT

The Requires

 

by Alex Gusev