|
@@ -127,6 +127,8 @@ class RavenHandler extends AbstractProcessingHandler
|
|
|
*/
|
|
*/
|
|
|
protected function write(array $record)
|
|
protected function write(array $record)
|
|
|
{
|
|
{
|
|
|
|
|
+ // ensures user context is empty
|
|
|
|
|
+ $this->ravenClient->user_context(null);
|
|
|
$options = array();
|
|
$options = array();
|
|
|
$options['level'] = $this->logLevels[$record['level']];
|
|
$options['level'] = $this->logLevels[$record['level']];
|
|
|
$options['tags'] = array();
|
|
$options['tags'] = array();
|
|
@@ -146,6 +148,10 @@ class RavenHandler extends AbstractProcessingHandler
|
|
|
}
|
|
}
|
|
|
if (!empty($record['context'])) {
|
|
if (!empty($record['context'])) {
|
|
|
$options['extra']['context'] = $record['context'];
|
|
$options['extra']['context'] = $record['context'];
|
|
|
|
|
+ if (!empty($record['context']['user'])) {
|
|
|
|
|
+ $this->ravenClient->user_context($record['context']['user']);
|
|
|
|
|
+ unset($options['extra']['context']['user']);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
if (!empty($record['extra'])) {
|
|
if (!empty($record['extra'])) {
|
|
|
$options['extra']['extra'] = $record['extra'];
|
|
$options['extra']['extra'] = $record['extra'];
|