yii-streamlog Send Yii 1 logs to stdout/stderr

  1. Installation
  2. Usage
  3. Links

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

3 0
1 follower
155 downloads
Yii Version: 1.1
License: BSD-2-Clause
Category: Logging
Developed by: Motin
Created on: Mar 11, 2015
Last updated: 9 years ago

Downloads

show all

Related Extensions