Yii sentry log is a component for Yii to send all logging and exception to sentry server instead of showing it on screen or save it on files, especially when you set YII_DEBUG to false, this module based on raven-php by getsentry.
You can also clone project at my github repository
Requirements ¶
- Yii framework v1.1.x or above
- Sentry Server
Usage ¶
- Put your clone inside
`
/protected/components/yii-sentry-log`
- Edit your
`
config.php`
...
'components'=>array(
...
'log'=>array(
'class'=>'CLogRouter',
'routes'=>array(
array(
'class'=>'application.components.yii-sentry-log.RSentryLog',
'dsn'=> '[YOUR_DSN_FROM_SENTRY_SERVER]',
'levels'=>'error, warning',
),
),
),
...
)
...
How to get sentry id
Great extension, thanks for share!
I would just change last line in your SentryLog component, so we get sentry message id(aka 'ident'), so users can reference to this bug:
$sentryEventId = $this->_client->getIdent($this->_client->captureMessage($title, array(), $level, true));
Sentry ID
Hi Ivica,
Sorry for late reply, its great idea thanks, I'll working on it ASAP, you can see the progress on Github Issues.
Thanks.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.