Skip to content

Make GITLAB_LOG_LEVEL affect more logs

Michael Kozono requested to merge gitlab-log-level-override-more-logs into master

What does this MR do and why?

Make GITLAB_LOG_LEVEL affect more logs

  • production_json.log
  • development_json.log
  • development.log
  • api_json.log

See &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.

  1. Add a env.runit file to the root directory of GDK
  2. Add a line export GITLAB_LOG_LEVEL=warn to the env.runit file
  3. gdk restart
  4. Observe logs with and without the environment variable set, or set to different values

If you set it to e.g. warn, then debug and info level logs are no longer output to the affected logs.

I think production_json.log can be tested by setting RAILS_ENV=production but I didn't try that yet and am not sure if that does weird things in GDK.

Merge request reports