Skip to content

Commit 7a48cd9

Browse files
committed
fix(contrib-auto-laravel): fix log level is string but underlying logger expects int leading to incorrect types
1 parent c28ea77 commit 7a48cd9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Instrumentation/Laravel/src/Watchers/LogWatcher.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@ public function recordLog(MessageLogged $log): void
3737
$underlyingLogger = $this->logger->getLogger();
3838

3939
/** @phan-suppress-next-line PhanUndeclaredMethod */
40-
if (method_exists($underlyingLogger, 'isHandling') && !$underlyingLogger->isHandling(
41-
$underlyingLogger->toMonologLevel($log->level))
40+
if (method_exists($underlyingLogger, 'isHandling')
41+
&& method_exists($underlyingLogger, 'toMonologLevel')
42+
&& !$underlyingLogger->isHandling($underlyingLogger->toMonologLevel($log->level))
4243
) {
4344
return;
4445
}

0 commit comments

Comments
 (0)