@@ -35,6 +35,7 @@ These collectors can be enabled in the config:
35
35
- [ Cache] ( #cache ) : Display all cache events.
36
36
- [ Models] ( #models ) : Loaded Models
37
37
- [ Jobs] ( #jobs ) : Sent emails
38
+ - [ Logs] ( #logs ) : Logs from the log files
38
39
- [ Pennant] ( #pennant ) : Show Pennant flags
39
40
- [ Files] ( #files ) : Show the files that are included/required by PHP.
40
41
@@ -88,7 +89,7 @@ To enable or disable any of the collectors, set the configuration to `true` or `
88
89
89
90
</details >
90
91
91
- ## Query Collector { #db }
92
+ ## Database Queries { #db }
92
93
93
94
<!-- md:version v1.0 -->
94
95
<!-- md:feature collectors.db -->
@@ -162,7 +163,7 @@ If you want to avoid any limits, you can set the option to `null`
162
163
![ Query Limits] ( img/query-limits.png )
163
164
164
165
165
- ## Messages Collector { #messages }
166
+ ## Messages { #messages }
166
167
167
168
<!-- md:version v1.0 -->
168
169
<!-- md:feature collectors.messages -->
@@ -180,7 +181,7 @@ When calling `debug()`, the source of the call is shown and can be opened with y
180
181
181
182
![ Messages Collector] ( img/messages.png )
182
183
183
- ## Log Collectors { #log }
184
+ ## Logger { #log }
184
185
185
186
<!-- md:version v1.0 -->
186
187
<!-- md:feature collectors.log -->
@@ -189,6 +190,35 @@ When the [Messages Collector](#messages) is enabled, Log messages are added to t
189
190
190
191
![ Monolog] ( img/monolog.png )
191
192
193
+ <details ><summary >config/debugbar.php</summary >
194
+
195
+ ``` php
196
+ 'options' => [
197
+ // ...
198
+ 'db' => [
199
+ 'with_params' => true, // Render SQL with the parameters substituted
200
+ 'exclude_paths' => [ // Paths to exclude entirely from the collector
201
+ // 'vendor/laravel/framework/src/Illuminate/Session', // Exclude sessions queries
202
+ ],
203
+ 'backtrace' => true, // Use a backtrace to find the origin of the query in your files.
204
+ 'backtrace_exclude_paths' => [], // Paths to exclude from backtrace. (in addition to defaults)
205
+ 'timeline' => false, // Add the queries to the timeline
206
+ 'duration_background' => true, // Show shaded background on each query relative to how long it took to execute.
207
+ 'explain' => [ // Show EXPLAIN output on queries
208
+ 'enabled' => false,
209
+ ],
210
+ 'hints' => false, // Show hints for common mistakes
211
+ 'show_copy' => true, // Show copy button next to the query,
212
+ 'slow_threshold' => false, // Only track queries that last longer than this time in ms
213
+ 'memory_usage' => false, // Show queries memory usage
214
+ 'soft_limit' => 100, // After the soft limit, no parameters/backtrace are captured
215
+ 'hard_limit' => 500, // After the hard limit, queries are ignored
216
+ ],
217
+ // ...
218
+ ],
219
+ ```
220
+ </details >
221
+
192
222
## Views { #views }
193
223
194
224
<!-- md:version v1.0 -->
@@ -246,6 +276,18 @@ This shows the current route and middleware.
246
276
247
277
![ RouteCollector] ( img/route.png )
248
278
279
+ <details ><summary >config/debugbar.php</summary >
280
+
281
+ ``` php
282
+ 'options' => [
283
+ 'route' => [
284
+ 'label' => true, // show complete route on bar
285
+ ],
286
+ ],
287
+ ```
288
+
289
+ </details >
290
+
249
291
## Exceptions { #exceptions }
250
292
251
293
<!-- md:version v1.0 -->
@@ -326,6 +368,19 @@ This is similar to the Timeline buts adds all events. This can be a lot of data,
326
368
327
369
![ Events] ( img/events.gif )
328
370
371
+ <details ><summary >config/debugbar.php</summary >
372
+
373
+ ``` php
374
+ 'options' => [
375
+ 'events' => [
376
+ 'data' => false, // collect events data, listeners
377
+ ],
378
+ ],
379
+ ```
380
+
381
+ </details >
382
+
383
+
329
384
## Auth { #auth }
330
385
331
386
<!-- md:version v1.2.2 -->
@@ -432,8 +487,9 @@ Show the hits/misses of the Cache in a Timeline.
432
487
433
488
``` php
434
489
'options' => [
435
- 'values' => true, // collect cache values
436
- ],
490
+ 'cache' => [
491
+ 'values' => true, // collect cache values
492
+ ], ],
437
493
```
438
494
439
495
</details >
@@ -458,6 +514,28 @@ Show the Jobs that are dispatched from this request.
458
514
459
515
![ Jobs Collector] ( img/jobs.png )
460
516
517
+ ## Logs { #logs }
518
+
519
+ <!-- md:version v1.0-->
520
+ <!-- md:feature collectors.logs -->
521
+ <!-- md:default false -->
522
+
523
+ Show the most recent logs from the log files in storage/logs
524
+
525
+ ![ Logs Collector] ( img/logs.png )
526
+
527
+ <details ><summary >config/debugbar.php</summary >
528
+
529
+ ``` php
530
+ 'options' => [
531
+ 'logs' => [
532
+ 'file' => null, // Additional files
533
+ ],
534
+ ],
535
+ ```
536
+
537
+ </details >
538
+
461
539
## Pennant { #pennant }
462
540
463
541
<!-- md:version v3.14.0 -->
@@ -479,67 +557,3 @@ Shows all the Pennant flags that are checked during this request
479
557
This was mainly useful before OPcache was widely used, and this collector could be used for optimizing files. It's deprecated now.
480
558
481
559
![ Files Collector] ( img/files.png )
482
-
483
- ## Additional options
484
-
485
- <details ><summary >config/debugbar.php</summary >
486
-
487
- ``` php
488
- /*
489
- |--------------------------------------------------------------------------
490
- | Extra options
491
- |--------------------------------------------------------------------------
492
- |
493
- | Configure some DataCollectors
494
- |
495
- */
496
-
497
- 'options' => [
498
- 'time' => [
499
- // See above
500
- ],
501
- 'messages' => [
502
- 'trace' => true, // Trace the origin of the debug message
503
- ],
504
- 'memory' => [
505
- 'reset_peak' => false, // run memory_reset_peak_usage before collecting
506
- 'with_baseline' => false, // Set boot memory usage as memory peak baseline
507
- 'precision' => 0, // Memory rounding precision
508
- ],
509
- 'auth' => [
510
- 'show_name' => true, // Also show the users name/email in the debugbar
511
- 'show_guards' => true, // Show the guards that are used
512
- ],
513
- 'db' => [
514
- // See above
515
- ],
516
- 'mail' => [
517
- 'timeline' => false, // Add mails to the timeline
518
- 'show_body' => true,
519
- ],
520
- 'views' => [
521
- // See above
522
- ],
523
- 'route' => [
524
- 'label' => true, // show complete route on bar
525
- ],
526
- 'session' => [
527
- 'hiddens' => [], // hides sensitive values using array paths
528
- ],
529
- 'symfony_request' => [
530
- 'hiddens' => [], // hides sensitive values using array paths, example: request_request.password
531
- ],
532
- 'events' => [
533
- 'data' => false, // collect events data, listeners
534
- ],
535
- 'logs' => [
536
- 'file' => null,
537
- ],
538
- 'cache' => [
539
- 'values' => true, // collect cache values
540
- ],
541
- ],
542
-
543
- ```
544
-
545
- </details >
0 commit comments