yii2-streamlog A Yii 2 log target for streams in URL format.

A Yii 2 log target for streams in URL format.

This log target allows you to log to any of the URL like targets that are supported by PHP. Typical use cases are docker containers that often log to STDOUT and STDERR, in which case the target urls would be php://stdout and php://stderr respectively.

Installation and Configuration ΒΆ

Install the package through composer:

composer require codemix/yii2-streamlog

And then add this to your application configuration:

<?php
return [
    // ...
    'components' => [
        // ...
        'log' => [
            'targets' => [
                [
                    'class' => 'codemix\streamlog\Target',
                    'url' => 'php://stdout',
                    'levels' => ['info','trace'],
                    'logVars' => [],
                ],
                [
                    'class' => 'codemix\streamlog\Target',
                    'url' => 'php://stderr',
                    'levels' => ['error', 'warning'],
                    'logVars' => [],
                ],
            ],
        ],

Please report any issues you may have on Github:

https://github.com/codemix/yii2-streamlog

1 0
1 follower
0 downloads
Yii Version: 2.0
License: MIT
Category: Logging
Developed by: Mike
Created on: Jul 1, 2015
Last updated: 2 years ago

Related Extensions