forked from torrust/torrust-index
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: disable sqlx logging for all statements
When the loggin level is set to INFO sqlx logs all SQL statements like this: ``` 2023-06-06T17:19:52.639651375+01:00 [sqlx::query][INFO] SELECT version FROM _sqlx_migrations …; rows affected: 0, rows returned: 0, elapsed: 58.361µs SELECT version FROM _sqlx_migrations WHERE success = false ORDER BY version LIMIT 1 ``` This commits makes sqlc to log only failed statements as errors and slow statements (>1 second) as warnings.
- Loading branch information
1 parent
7347fee
commit 7bcf20e
Showing
3 changed files
with
23 additions
and
7 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
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