forgejo/models
Gusted 866229bc32
[GITEA] Log SQL queries when the database return error
- When the database returns an error about the SQL query, the error is
logged but not the SQL query and arguments, which is just as valuable as
the vague deeply hidden documented error that the database returns.
It's possible to log the SQL query by logging **all** SQL queries. For
bigger instances such as Codeberg, this is not a viable option.
- Adds a new hook, enabled by default, to log SQL queries with their
arguments and the error returned by the database when the database
returns an error.
- This likely needs some fine tuning in the future to decide when to
enable this, as the error is already logged and if people have the
`[database].LOG_SQL` option enabled, the SQL would be logged twice. But
given that it's an rare occurence for SQL queries to error, it's fine to
leave that as-is.
- Ref: https://codeberg.org/forgejo/forgejo/issues/1998
2024-01-14 00:01:39 +01:00
..
actions [GITEA] Add support for shields.io-based badges 2024-01-08 17:12:01 +01:00
activities
admin
asymkey
auth [GITEA] Fix session generation for database (squash) timeutil.Mock 2024-01-08 17:05:48 +01:00
avatars
db [GITEA] Log SQL queries when the database return error 2024-01-14 00:01:39 +01:00
dbfs
fixtures
forgejo/semver
forgejo_migrations [FEAT] Repository flags 2024-01-09 13:13:15 +01:00
git
issues [GITEA] Avoid WHERE IN for comment migration query 2024-01-08 17:05:48 +01:00
migrations
organization
packages
perm [GITEA] Optionally allow anyone to edit Wikis 2024-01-08 17:05:48 +01:00
project
pull [GITEA] GetScheduledMergeByPullID may involve a system user 2024-01-08 17:05:47 +01:00
repo [FEAT] Repository flags 2024-01-09 13:13:15 +01:00
secret
shared/types
system
unit
unittest
user [GITEA] add option for banning dots in usernames (squash) set in test 2024-01-08 17:53:02 +01:00
webhook
error.go
fixture_generation.go
fixture_test.go
main_test.go
org.go
org_team.go
org_team_test.go
org_test.go
repo.go
repo_test.go
repo_transfer.go
repo_transfer_test.go