karataserkan / log4yii
Yii2 Log Target
1.2.3
2022-08-16 08:51 UTC
Requires
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-httpclient: *
This package is auto-updated.
Last update: 2026-03-16 16:25:18 UTC
README
log4yii
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist karataserkan/log4yii "*"
or add
"karataserkan/log4yii": "*"
to the require section of your composer.json file.
Usage
Once the extension is installed, simply use it in your code by :
<?= 'targets' => [ [ 'class' => 'karataserkan\log4yii\HttpLogTarget', 'levels' => ['info', 'error', 'warning'], 'logVars' => ['_GET', '_POST', '_FILES'], 'categories' => ['test'], 'baseUrl' => 'http://url' ], [ 'class' => 'karataserkan\log4yii\StreamLogTarget', 'levels' => ['info', 'error', 'warning'], 'logVars' => ['_GET', '_POST', '_FILES'], 'url' => 'php://stdout' ] ], ?>```