Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload Log Files #1437

Closed
MTecknology opened this issue Apr 4, 2017 · 11 comments · Fixed by #11777
Closed

Reload Log Files #1437

MTecknology opened this issue Apr 4, 2017 · 11 comments · Fixed by #11777
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@MTecknology
Copy link
Contributor

If it's not currently possible, could gitea re-open log files on SIGHUP? If it is possible, could somebody tell me what I'm doing wrong? At the moment, I have logrotate restarting the gitea service.

@mckaygerhard
Copy link

i have this problem too, seems gitea manages by own the log files and the OS vendor distribution cannot take care of to manage it as must be

@Perlovka
Copy link

You can use copytruncate option of logrotate.

@lunny lunny added the type/question Issue needs no code to be fixed, only a description on how to fix it yourself. label Dec 12, 2017
@MTecknology
Copy link
Contributor Author

I would consider copytruncate to be a workable hack, but the better solution would be to support re-opening log files.

@lunny This is a feature request, not a question.

@lunny lunny added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. and removed type/question Issue needs no code to be fixed, only a description on how to fix it yourself. labels Dec 13, 2017
@lonix1
Copy link
Contributor

lonix1 commented May 19, 2020

@MTecknology I'm also handling log rotation myself, using logrotate. (Must do so, so can feed logs into log management stack.)

The gitea container already runs s6, so log rotation would be very easy.

With s6 I would typically do:

s6-svc -1 /etc/s6/gitea/      # or -2 for SIGUSR2

Which would make s6 send signal SIGUSR1 to the app, which should force the app to release and reopen the log file (which has just been rotated).

But of course gitea doesn't currently support reopening of its log file.

Have you found a workaround in the meantime?

@MTecknology

This comment has been minimized.

@lonix1

This comment has been minimized.

@MTecknology

This comment has been minimized.

@lonix1

This comment has been minimized.

@MTecknology

This comment has been minimized.

@lonix1

This comment has been minimized.

@MTecknology

This comment has been minimized.

@go-gitea go-gitea locked and limited conversation to collaborators May 31, 2020
@zeripath zeripath added this to the 1.13.0 milestone Jul 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants