Skip to content

Commit

Permalink
Last event ID stored in LogRoute instance
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomáš Tatarko committed Nov 11, 2015
1 parent d7e9ed1 commit 12714ff
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/LogRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ class LogRoute extends CLogRoute
*/
public $ravenLogCategory = 'raven';

/**
* Local store for last event's ID
* @var string
*/
public $eventId;

/**
* Sentry client
* @var Client
Expand Down Expand Up @@ -143,7 +149,8 @@ public function handleException($event)
return false;
}

$this->_errorHandler->handleException($event->exception);
$this->_errorHandler->handleException($event->exception);
$this->eventId = $event->exception->event_id;
if ($lastError = $sentry->getLastError()) {
Yii::log($lastError, CLogger::LEVEL_ERROR, $this->ravenLogCategory);
}
Expand Down

0 comments on commit 12714ff

Please sign in to comment.