Skip to content

Commit

Permalink
Add more excludes to default queries.report_pattern
Browse files Browse the repository at this point in the history
Fix auth guard lookup for log headers
  • Loading branch information
onlime committed Mar 10, 2024
1 parent 8cff8f7 commit 5fc6b47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion config/sql-reporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
*/
'report_pattern' => env(
'SQL_REPORTER_QUERIES_REPORT_PATTERN',
'/^(?!select\s|start transaction|commit|update `sessions`).*/i'
'/^(?!select\s|start transaction|commit|insert into `logins`|(insert into|update|delete from) `sessions`).*/i'
),

/*
Expand Down
2 changes: 1 addition & 1 deletion src/Formatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function getHeader(): string
'origin' => $this->originLine(),
'status' => sprintf('Executed %s queries in %s', count($queryLog), $totalTime),
'user' => $username,
'guard' => Auth::guard()->name,
'guard' => Auth::check() ? Auth::getDefaultDriver() : '',
'env' => $this->app->environment(),
'agent' => Request::userAgent() ?? PHP_SAPI,
'ip' => $ip,
Expand Down

0 comments on commit 5fc6b47

Please sign in to comment.