neam/yii-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

Installs: 77 053

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 1

Forks: 1

Open Issues: 0

Type:yii-extension

1.0.1 2015-03-11 23:46 UTC

This package is not auto-updated.

Last update: 2024-11-23 17:32:51 UTC


README

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