Use GITLAB_LOG_LEVEL for Geo logs
What does this MR do and why?
The Geo log level is tied to Rails log level, which is set to info, and I think GitLab doesn't provide a way to modify it. GitLab does provide GITLAB_LOG_LEVEL
https://docs.gitlab.com/ee/administration/logs/index.html#override-default-log-level.
This MR makes geo.log
output abide by GITLAB_LOG_LEVEL
.
Related to &6034
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Configure Geo if you haven't already
- Add a
env.runit
file to the root directory of both GDK directories - Add a line
export GITLAB_LOG_LEVEL=warn
to bothenv.runit
files -
gdk restart
both GDKs - Observe logs with and without the environment variable set
You should see that if you set it to e.g. warn
, then the services no longer output debug
and info
level logs.
I checked that for example error
level is still output by manually modifying the checksum of a project repository in the project_states
table in the primary site and then reverifying the project on the secondary site. It did output the error
level log message as expected.