PHP code example of consultnn / yii2-stream-target

1. Go to this page and download the library: Download consultnn/yii2-stream-target library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

consultnn / yii2-stream-target example snippets


    [
        'targets' => [
            [
                'class'   => 'consultnn\streamTarget\StreamTarget',
                'levels'  => ['error', 'warning'],
                'stream' => 'php://stderr',
                'except' => ['yii\web\HttpException:404']
            ],
            [
                'class'   => 'consultnn\streamTarget\StreamTarget',
                'levels'  => ['info'],
                'stream' => 'php://stdout',
            ]
        ]
    ]