m8rge / yii2-pinba-log-target
Pinba log target for Yii2
Installs: 4 454
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Requires
- php: >=5.4
- ext-mbstring: *
Requires (Dev)
- misterion/pinba-phpdoc: dev-master
- yiisoft/yii2: ^2.0.15
This package is auto-updated.
Last update: 2024-12-13 01:57:11 UTC
README
Add to yii2 config:
[ 'components' => [ 'log' => [ 'targets' => [ [ 'class' => \m8rge\pinba\PinbaLogTarget::class, 'pinbaHost' => 'pinba.engine.host.name.com', // required 'enabled' => true, 'serverName' => 'myapp.com', // especially usefull in cli scripts 'excludeScriptNames' => ['/debug/*'], // do not profile debug panel ], ], ], ], ],
Profile in code:
\Yii::beginProfile($token, $category . '::' . $method); // ... \Yii::endProfile($token, $category . '::' . $method);