mirror of
https://github.com/Seldaek/monolog.git
synced 2025-02-24 06:52:34 +01: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:
parent
c7ca9f7e5d
commit
1242bed1c9
@ -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'];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user