forked from rokde/laravel-slow-query-logger
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade to all laravel versions to 9.x
A few tweaks made to suit our needs. May move the threashold to micro-seconds in a later release.
- Loading branch information
Showing
4 changed files
with
127 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
{ | ||
"name": "rokde/laravel-slow-query-logger", | ||
"description": "Slow Query Logger for Laravel", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Robert Kummer", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Rokde\\LaravelSlowQueryLogger\\": "src/" | ||
} | ||
}, | ||
"minimum-stability": "stable", | ||
"require": { | ||
"php": "^7.1.3", | ||
"illuminate/database": "^5.6", | ||
"illuminate/support": "^5.6" | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Rokde\\LaravelSlowQueryLogger\\LaravelSlowQueryLoggerProvider" | ||
] | ||
} | ||
} | ||
"name": "rokde/laravel-slow-query-logger", | ||
"description": "Slow Query Logger for Laravel", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Robert Kummer", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Rokde\\LaravelSlowQueryLogger\\": "src/" | ||
} | ||
}, | ||
"minimum-stability": "stable", | ||
"require": { | ||
"illuminate/database": "^5.6|^7.0|^8.0|^9.0", | ||
"illuminate/support": "^5.6|^7.0|^8.0|^9.0" | ||
}, | ||
"extra": { | ||
"laravel": { | ||
"providers": [ | ||
"Rokde\\LaravelSlowQueryLogger\\LaravelSlowQueryLoggerProvider" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,33 @@ | ||
<?php | ||
|
||
return [ | ||
/** | ||
* log when you are on these environments | ||
*/ | ||
'enabled' => env('LARAVEL_SLOW_QUERY_LOGGER_ENABLED', false), | ||
/** | ||
* log when you are on these environments | ||
*/ | ||
'enabled' => env('LARAVEL_SLOW_QUERY_LOGGER_ENABLED', false), | ||
|
||
/** | ||
* log when you are on these environments | ||
*/ | ||
'channel' => env('LARAVEL_SLOW_QUERY_LOGGER_CHANNEL', 'single'), | ||
/** | ||
* log when you are on these environments | ||
*/ | ||
'channel' => env('LARAVEL_SLOW_QUERY_LOGGER_CHANNEL', 'single'), | ||
|
||
/** | ||
* level to log | ||
*/ | ||
'log-level' => env('LARAVEL_SLOW_QUERY_LOGGER_LOG_LEVEL', 'debug'), | ||
/** | ||
* Log level to use. | ||
*/ | ||
'level' => env('LARAVEL_SLOW_QUERY_LOGGER_LEVEL', 'debug'), | ||
|
||
/** | ||
* log all sql queries that are slower than X seconds | ||
* laravel measures at a precision of 2 digits, so 0.7134 will be logged as 0.71 | ||
*/ | ||
'time-to-log' => env('LARAVEL_SLOW_QUERY_LOGGER_TIME_TO_LOG', 0.7), | ||
/** | ||
* Log the bindings separately in the context. | ||
*/ | ||
'show-bindings' => env('LARAVEL_SLOW_QUERY_LOGGER_SHOW_BINDINGS', false), | ||
|
||
/** | ||
* Substitute the bindings in the placeholders of the query. | ||
*/ | ||
'replace-bindings' => env('LARAVEL_SLOW_QUERY_LOGGER_REPLACE_BINDINGS', false), | ||
|
||
/** | ||
* log all sql queries that are slower than a threashold milli-seconds | ||
*/ | ||
'threshold-ms' => env('LARAVEL_SLOW_QUERY_LOGGER_THRESHOLD_MS', 700), | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters