karataserkan / log4yii
Yii2 Log Target
Installs: 2 146
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
- yiisoft/yii2-httpclient: *
This package is auto-updated.
Last update: 2025-04-16 14:30:30 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' ] ], ?>```