File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -16,16 +16,21 @@ public function boot()
16
16
public function output (Collection $ detectedQueries , Response $ response )
17
17
{
18
18
LaravelLog::info ('Detected N+1 Query ' );
19
+
19
20
foreach ($ detectedQueries as $ detectedQuery ) {
20
- LaravelLog:: info ( 'Model: ' .$ detectedQuery ['model ' ]) ;
21
- LaravelLog:: info ( ' Relation: ' . $ detectedQuery [ ' relation ' ]);
22
- LaravelLog:: info ( ' Num-Called : ' .$ detectedQuery ['count ' ]) ;
21
+ $ logOutput = 'Model: ' .$ detectedQuery ['model ' ] . PHP_EOL ;
22
+
23
+ $ logOutput .= ' Relation : ' .$ detectedQuery ['relation ' ] . PHP_EOL ;
23
24
24
- LaravelLog::info ('Call-Stack: ' );
25
+ $ logOutput .= 'Num-Called: ' .$ detectedQuery ['count ' ] . PHP_EOL ;
26
+
27
+ $ logOutput .= 'Call-Stack: ' . PHP_EOL ;
25
28
26
29
foreach ($ detectedQuery ['sources ' ] as $ source ) {
27
- LaravelLog:: info ( '# ' .$ source ->index .' ' .$ source ->name .': ' .$ source ->line ) ;
30
+ $ logOutput .= '# ' .$ source ->index .' ' .$ source ->name .': ' .$ source ->line . PHP_EOL ;
28
31
}
32
+
33
+ LaravelLog::info ($ logOutput );
29
34
}
30
35
}
31
36
}
You can’t perform that action at this time.
0 commit comments