File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed
src/Instrumentation/Laravel Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 4848 "lock" : false ,
4949 "sort-packages" : true ,
5050 "allow-plugins" : {
51- "php-http/discovery" : false
51+ "php-http/discovery" : false ,
52+ "tbachert/spi" : true
5253 }
5354 }
5455}
Original file line number Diff line number Diff line change @@ -29,10 +29,7 @@ public function register(Application $app): void
2929 $ this ->logger = $ app ['log ' ];
3030 }
3131
32- /**
33- * Record a log.
34- */
35- public function recordLog (MessageLogged $ log ): void
32+ public function shouldRecordLog (MessageLogged $ log ): bool
3633 {
3734 $ underlyingLogger = $ this ->logger ->getLogger ();
3835
@@ -41,6 +38,18 @@ public function recordLog(MessageLogged $log): void
4138 && method_exists ($ underlyingLogger , 'toMonologLevel ' )
4239 && !$ underlyingLogger ->isHandling ($ underlyingLogger ->toMonologLevel ($ log ->level ))
4340 ) {
41+ return false ;
42+ }
43+
44+ return true ;
45+ }
46+
47+ /**
48+ * Record a log.
49+ */
50+ public function recordLog (MessageLogged $ log ): void
51+ {
52+ if (!$ this ->shouldRecordLog ($ log )) {
4453 return ;
4554 }
4655
You can’t perform that action at this time.
0 commit comments