Skip to content

consultnn/yii2-stream-target

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Yii2 StreamTarget

StreamTarget sends log messages to the php stream wrappers.

Converts an arrays and objects to strings using Json::encode().

Example config:

    [
        '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',
            ]
        ]
    ]