We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6cad7b2 commit 01de10bCopy full SHA for 01de10b
1 file changed
src/Monolog/LogsHandler.php
@@ -66,7 +66,7 @@ public function handle($record): bool
66
self::getSentryLogLevelFromMonologLevel($record['level']),
67
$record['message'],
68
[],
69
- array_merge($record['context'], $record['extra'], ['sentry.origin' => 'auto.log.monolog'])
+ $this->compileAttributes($record)
70
);
71
72
return $this->bubble === false;
@@ -123,4 +123,14 @@ public function __destruct()
123
// Just in case so that the destructor can never fail.
124
}
125
126
+
127
+ /**
128
+ * @param array<string,mixed>|LogRecord $record
129
+ *
130
+ * @return array<string,mixed>
131
+ */
132
+ protected function compileAttributes($record): array
133
+ {
134
+ return array_merge($record['context'], $record['extra'], ['sentry.origin' => 'auto.log.monolog']);
135
+ }
136
0 commit comments