All SQL statements are logged with gitea v1.10 by default #4395

Closed
opened 2025-11-02 05:49:16 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @lhooge on GitHub (Nov 26, 2019).

  • Gitea version (or commit ref): 1.10.0
  • Git version: git version 2.11.0
  • Operating system: Linux petrowitsch 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

I've update gitea to version 1.10.0 and it seems that all statements are being logged because gitea sets showExecTime to true (https://github.com/go-gitea/gitea/blob/master/models/models.go#L154)
In my opinion it should be made configurable with a parameter to log SQL statements for debugging purposes.

Originally created by @lhooge on GitHub (Nov 26, 2019). - Gitea version (or commit ref): 1.10.0 - Git version: git version 2.11.0 - Operating system: Linux petrowitsch 4.9.0-8-amd64 #1 SMP Debian 4.9.144-3.1 (2019-02-19) x86_64 GNU/Linux - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description I've update gitea to version 1.10.0 and it seems that all statements are being logged because gitea sets showExecTime to true (https://github.com/go-gitea/gitea/blob/master/models/models.go#L154) In my opinion it should be made configurable with a parameter to log SQL statements for debugging purposes.
Author
Owner

@lunny commented on GitHub (Nov 26, 2019):

It depends on https://github.com/go-gitea/gitea/blob/master/models/models.go#L159

@lunny commented on GitHub (Nov 26, 2019): It depends on https://github.com/go-gitea/gitea/blob/master/models/models.go#L159
Author
Owner

@lhooge commented on GitHub (Nov 26, 2019):

Thank you. Sorry, I didn't see that property.

@lhooge commented on GitHub (Nov 26, 2019): Thank you. Sorry, I didn't see that property.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4395