Add task to truncate Rails logs
What does this Merge Request do and why?
Users sometimes run into disk space problems because these logs just
keep growing forever. This adds a Makefile
task to truncate them,
and documents how to add this as a hook before every gdk update
.
Slack thread for context (internal): https://gitlab.slack.com/archives/C2Z9A056E/p1634715463051200
Manual testing
- Check sizes with
du gitlab/log/*
- Run
tail -f gitlab/log/development.log
in a separate terminal - Run
gdk update
(you can abort after the hooks have run) - Check sizes with
du gitlab/log/*
(should all be0
now) - See the message
tail: log/development.log: file truncated
- Run
rails console
to see that logging still works andtail
picks it up again
Merge Request checklist
-
This change is backward compatible. If not, please include steps to communicate to our users. -
Tests added for new functionality. If not, please raise Issue to follow-up. - [-] Documentation added/updated, if needed.
- [-]
gdk doctor
test added, if needed. -
Add the ~highlight
label if this MR should be included in theCHANGELOG.md
.
Edited by Markus Koller