File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -16,16 +16,21 @@ public function boot()
1616 public function output (Collection $ detectedQueries , Response $ response )
1717 {
1818 LaravelLog::info ('Detected N+1 Query ' );
19+
1920 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 ;
2324
24- LaravelLog::info ('Call-Stack: ' );
25+ $ logOutput .= 'Num-Called: ' .$ detectedQuery ['count ' ] . PHP_EOL ;
26+
27+ $ logOutput .= 'Call-Stack: ' . PHP_EOL ;
2528
2629 foreach ($ detectedQuery ['sources ' ] as $ source ) {
27- LaravelLog:: info ( '# ' .$ source ->index .' ' .$ source ->name .': ' .$ source ->line ) ;
30+ $ logOutput .= '# ' .$ source ->index .' ' .$ source ->name .': ' .$ source ->line . PHP_EOL ;
2831 }
32+
33+ LaravelLog::info ($ logOutput );
2934 }
3035 }
3136}
You can’t perform that action at this time.
0 commit comments