2017 © Pedro Peláez
 

package yii-monolog

Extension for using monolog with yii 1.x

image

asuran/yii-monolog

Extension for using monolog with yii 1.x

  • Monday, March 6, 2017
  • by asuran
  • Repository
  • 1 Watchers
  • 1 Stars
  • 54 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 10 % Grown

The README.md

Monolog integration for Yii 1.x

Inspired by enlitepro/enlite-monolog and smartapps-fr/yii-monolog, (*1)

Install

The recommended way to install is through composer from command line., (*2)

composer require asuran/yii-monolog

Usage

  1. Add the component to the preload list
<?php 

return [
    'preload' => [
        'monolog',
    ],
];
  1. Configure the component
<?php
return [
    'components' => [
        'monolog' => [
            'class' => 'YiiMonolog\MonologComponent',
            'name' => 'MyApplication',
            'handlers' => [
                'file' => [
                    'class' => 'Monolog\Handler\StreamHandler',
                    'stream' => '/runtime/app.log',
                    'formatter' => 'Monolog\Formatter\LineFormatter',
                ],
            ],
            'processors' => [
                'Monolog\Processor\ProcessIdProcessor',
            ],
        ],
    ],
];
  1. Add log route
<?php
return [
    'components' => [
        'log' => [
            'class' => 'CLogRouter',
            'routes' => [
                'monolog' => [
                    'class' => 'YiiMonolog\MonologLogRoute',
                ],
            ],
        ],
    ],
];

  1. Add exception handler
<?php
return [
    'components' => [
        'errorHandler' => [
            'class' => 'YiiMonolog\MonologErrorHandler',
            'errorAction' => 'site/error',
        ],
    ],
];

The Versions

06/03 2017

dev-master

9999999-dev

Extension for using monolog with yii 1.x

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Dmitriy Sergeev

debug log monolog exception yii error monitoring

06/03 2017

v1.1.0

1.1.0.0

Extension for using monolog with yii 1.x

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Dmitriy Sergeev

debug log monolog exception yii error monitoring

16/02 2017

v1.0.0

1.0.0.0

Extension for using monolog with yii 1.x

  Sources   Download

GPL-3.0

The Requires

 

The Development Requires

by Dmitriy Sergeev

debug log monolog exception yii error monitoring