|
|
@@ -38,6 +38,12 @@ class RavenHandler extends AbstractProcessingHandler
|
|
|
Logger::EMERGENCY => Raven_Client::FATAL,
|
|
|
);
|
|
|
|
|
|
+ /**
|
|
|
+ * @var string should represent the current version of the calling
|
|
|
+ * software. Can be any string (git commit, version number)
|
|
|
+ */
|
|
|
+ private $release;
|
|
|
+
|
|
|
/**
|
|
|
* @var Raven_Client the client object that sends the message to the server
|
|
|
*/
|
|
|
@@ -169,6 +175,10 @@ class RavenHandler extends AbstractProcessingHandler
|
|
|
$options['extra']['extra'] = $record['extra'];
|
|
|
}
|
|
|
|
|
|
+ if (!empty($this->release) && !isset($options['release'])) {
|
|
|
+ $options['release'] = $this->release;
|
|
|
+ }
|
|
|
+
|
|
|
if (isset($record['context']['exception']) && $record['context']['exception'] instanceof \Exception) {
|
|
|
$options['extra']['message'] = $record['formatted'];
|
|
|
$this->ravenClient->captureException($record['context']['exception'], $options);
|
|
|
@@ -208,4 +218,14 @@ class RavenHandler extends AbstractProcessingHandler
|
|
|
{
|
|
|
return array('checksum', 'release');
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param string $value
|
|
|
+ */
|
|
|
+ public function setRelease($value)
|
|
|
+ {
|
|
|
+ $this->release = $value;
|
|
|
+
|
|
|
+ return $this;
|
|
|
+ }
|
|
|
}
|