File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ public function handle($record): bool
6666 self ::getSentryLogLevelFromMonologLevel ($ record ['level ' ]),
6767 $ record ['message ' ],
6868 [],
69- array_merge ($ record[ ' context ' ], $ record [ ' extra ' ], [ ' sentry.origin ' => ' auto.log.monolog ' ] )
69+ $ this -> compileAttributes ($ record )
7070 );
7171
7272 return $ this ->bubble === false ;
@@ -123,4 +123,14 @@ public function __destruct()
123123 // Just in case so that the destructor can never fail.
124124 }
125125 }
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+ }
126136}
You can’t perform that action at this time.
0 commit comments