Skip to content

Commit 1d5ed58

Browse files
authored
Use context data for logging
1 parent 069db15 commit 1d5ed58

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/Concerns/AutoloadsRelationships.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,12 @@ private function logAutoload(string $relationship)
9090

9191
$this->getLogDriver();
9292

93-
$file = $stack['file'];
94-
$lineNo = $stack['line'];
95-
96-
$blade = $this->getBlade($file);
97-
98-
$this->logDriver->info("[LARAVEL-JIT-LOADER] Relationship ". static::class."::{$relationship} was JIT-loaded."
99-
." Called in {$file} on line {$lineNo}" . ($blade ? " view: {$blade})" : ""));
93+
$this->logDriver->info('[LARAVEL-JIT-LOADER] Relationship was JIT-loaded.', [
94+
'relationship' => static::class.'::'.$relationship,
95+
'file' => $stack['file'],
96+
'line' => $stack['line'],
97+
'view' => $this->getBlade($file),
98+
]);
10099
}
101100

102101
/**

0 commit comments

Comments
 (0)