mirror of
https://github.com/Seldaek/monolog.git
synced 2025-07-15 18:46:23 +02:00
Updated the RavenHandler
It can now make use of the tags processor to display tags inside Sentry. It can also include tags that were specified in the context.
This commit is contained in:
@ -129,6 +129,13 @@ class RavenHandler extends AbstractProcessingHandler
|
|||||||
{
|
{
|
||||||
$options = array();
|
$options = array();
|
||||||
$options['level'] = $this->logLevels[$record['level']];
|
$options['level'] = $this->logLevels[$record['level']];
|
||||||
|
if (!empty($record['tags'])) {
|
||||||
|
$options['tags'] = $record['tags'];
|
||||||
|
}
|
||||||
|
if (!empty($record['context']['tags'])) {
|
||||||
|
$options['tags'] = array_merge($record['context']['tags'], $options['tags']);
|
||||||
|
unset($record['context']['tags']);
|
||||||
|
}
|
||||||
if (!empty($record['context'])) {
|
if (!empty($record['context'])) {
|
||||||
$options['extra']['context'] = $record['context'];
|
$options['extra']['context'] = $record['context'];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user