dev-master
9999999-devSimple Yii2 Sentry target for logging (http://getsentry.com)
BSD
The Requires
- php >=5.4.0
- raven/raven 0.8.0
The Development Requires
by Dmitry DarkAiR Romanov
logger log logging yii2 sentry target
Simple Yii2 Sentry target for logging (http://getsentry.com)
Yii2 Sentry target for logging based on Raven client., (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
$ php composer.phar require darkair/yii2-sentry-log "dev-master"
or add, (*4)
"darkair/yii2-sentry-log": "dev-master"
to the require
section of your composer.json
file., (*5)
Add target class in your project config:, (*6)
'components' => [ 'log' => [ 'targets' => [ [ 'class' => 'sentry\SentryTarget', 'levels' => ['error', 'warning'], // or smth else 'dsn' => '', // sentry access string ], ], ],
Then use like ordinary log:, (*7)
Yii::error('some string');
or, (*8)
Yii::error([ 'msg' => 'some message', 'data' => [...], // Any pair key=>value for adding to the sentry message ]);
Because the mechanism of logging is asyncronical, standard sentry stacktrace is unavailable. But this extension sends logger stacktrace in extra parameters of message., (*9)
Simple Yii2 Sentry target for logging (http://getsentry.com)
BSD
logger log logging yii2 sentry target