Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable logtrace for messages #1508

Merged
merged 4 commits into from
Feb 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": "^8.0",
"maximebf/debugbar": "^1.19",
"maximebf/debugbar": "^1.20",
"illuminate/routing": "^9|^10",
"illuminate/session": "^9|^10",
"illuminate/support": "^9|^10",
Expand Down
3 changes: 3 additions & 0 deletions config/debugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
'time' => [
'memory_usage' => false, // Calculated by subtracting memory start and end, it may be inaccurate
],
'messages' => [
'trace' => true, // Trace the origin of the debug message
],
'memory' => [
'reset_peak' => false, // run memory_reset_peak_usage before collecting
'with_baseline' => false, // Set boot memory usage as memory peak baseline
Expand Down
8 changes: 7 additions & 1 deletion src/LaravelDebugbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,13 @@ public function boot()
}

if ($this->shouldCollect('messages', true)) {
$this->addCollector(new MessagesCollector());
$trace = $this->app['config']->get('debugbar.options.messages.trace', true);
$messages = new MessagesCollector();
if ($trace) {
$messages->collectFileTrace(true);
}

$this->addCollector($messages);
}

if ($this->shouldCollect('time', true)) {
Expand Down
Loading