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

Support SIGHUP for logrotate #114

Closed
SystemKeeper opened this issue Jun 27, 2023 · 3 comments · Fixed by #116
Closed

Support SIGHUP for logrotate #114

SystemKeeper opened this issue Jun 27, 2023 · 3 comments · Fixed by #116

Comments

@SystemKeeper
Copy link
Contributor

When rotating garm.log the file handlers need to be re-opened. Currently we just do a restart of garm when we rotated the log. Would be nice if we could just send a SIGHUP (or something else) to gracefully to this without the need to restart.

@gabriel-samfira
Copy link
Member

gabriel-samfira commented Jun 27, 2023

Hmm. If you specified the log path specifically and are not logging to syslog, garm should rotate automatically when it reaches ~500 MB or 28 days. See: https://github.com/cloudbase/garm/blob/main/util/util.go#L170-L176

We can also add a SIGHUP handler of course.

@SystemKeeper
Copy link
Contributor Author

Oh I see. I wasn't aware of that build-in functionality... Hm, I think SIGHUP wouldn't hurt for people wanting to use logrotate, but I guess the build-in functionality should be be more visible in the future?!

@gabriel-samfira
Copy link
Member

A lot more things should be more visible 🫣. I need to do a far better job at documenting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants