Skip to content

Latest commit

 

History

History
40 lines (28 loc) · 1.33 KB

README.md

File metadata and controls

40 lines (28 loc) · 1.33 KB

Yii 1 Streamlog

Send Yii 1 logs to stdout/stderr - created to be used with the php-fpm/nginx Docker stack available at http://github.com/neam/docker-stack

Thanks to Haensel for this forum post!

Installation

Install via composer:

composer require neam/yii-streamlog:*

Or download the extension, copy the src folder to your project and make sure to require the file LogRoute.php at some stage of application initiation.

Usage

Change all your existing routes that use CFileLogRoute to instead use \neam\yii_streamlog\LogRoute:

'components' => array(
    'log' => array(
        'class' => 'CLogRouter',
        'routes' => array(
            array(
                'class' => '\neam\yii_streamlog\LogRoute',
                'levels' => 'error, warning',
            ),
        ),
    ),
),

Also, make sure to set catch_worker_output=yes in your php-fpm pool config.

Links