Gunicorn: Option for --check-config to print resolved configuration

Created on 29 May 2019  路  6Comments  路  Source: benoitc/gunicorn

--check-config validates the configuration, but it'd be good to have a way for it to print out the resolved settings (ie. the combination of defaults, environment, config file, app settings, command line, etc) so the user can check everything is set as expected.

Using logging (--log-level=DEBUG) might be a good approach in general, but gets a bit meta in this case. Maybe --check-config=print?

Then pprint.pprint(self.cfg.settings) or json.dump(self.cfg.settings, sys.stdout, indent=2) before self.load() in: https://github.com/benoitc/gunicorn/blob/6df58a99b5f28f73b31364964e05ed05a51eb814/gunicorn/app/base.py#L193-L197

help wanted FeaturCli FeaturConfig good first issue

All 6 comments

I would love to see a print-config option. I would review such a PR.

It's a good idea, thank you.

Hello. I am willing to work on this issue. Could someone assign it to me. Thank you.

@iwhiz I assigned you. It looks like @rcoup made good progress on a PR. Maybe you can start by reviewing that.

Review done for #2054.

2054 is merged. Thanks everyone!

Was this page helpful?
0 / 5 - 0 ratings