serv.log not getting rolled over #3324

Closed
opened 2025-11-02 05:08:20 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @shollander on GitHub (May 13, 2019).

  • Gitea version (or commit ref): 1.8.1
  • Operating system: CentOS 7
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant

Description

The log files that Gitea writes to get rolled over nicely. Unfortuately, the serv.log file does not get rolled over. The file just keeps on growing and will eventually cause disk space issues.
Please include this file to the ones that get rolled over.

Originally created by @shollander on GitHub (May 13, 2019). - Gitea version (or commit ref): 1.8.1 - Operating system: CentOS 7 - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant ## Description The log files that Gitea writes to get rolled over nicely. Unfortuately, the `serv.log` file does not get rolled over. The file just keeps on growing and will eventually cause disk space issues. Please include this file to the ones that get rolled over.
GiteaMirror added the type/enhancement label 2025-11-02 05:08:20 -06:00
Author
Owner

@zeripath commented on GitHub (May 13, 2019):

serv.log http.log and the hook logs need some more thought.

Currently they're completely unconfigurable and I'm not entirely certain what they're supposed to log.

However, having them not rotate by default certainly seems like a mistake.


OK, so they're created by a call to setup(...) from here:

5df5bfbd13/cmd/serv.go (L67-L72)

Which calls this:

5df5bfbd13/modules/log/log.go (L77-L86)


So basically changing that last line will make it rotate.

@zeripath commented on GitHub (May 13, 2019): `serv.log` `http.log` and the hook logs need some more thought. Currently they're completely unconfigurable and I'm not entirely certain what they're supposed to log. However, having them not rotate by default certainly seems like a mistake. --- OK, so they're created by a call to `setup(...)` from here: https://github.com/go-gitea/gitea/blob/5df5bfbd134b4348c333cf81b5bd9ff16ec667e0/cmd/serv.go#L67-L72 Which calls this: https://github.com/go-gitea/gitea/blob/5df5bfbd134b4348c333cf81b5bd9ff16ec667e0/modules/log/log.go#L77-L86 --- So basically changing that last line will make it rotate.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3324