Skip to content

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

Notifications You must be signed in to change notification settings

neam/yii-streamlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages