Skip to content

Commit

Permalink
add info log
Browse files Browse the repository at this point in the history
  • Loading branch information
paulineribeyre committed Dec 6, 2022
1 parent fa7fe78 commit 230e11b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fence/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ def post_process(self):
self.force_default_if_none(default, default_cfg=default_config)

# allow setting DB connection string via env var
self["DB"] = os.environ.get("DB", self["DB"])
if os.environ.get("DB"):
logger.info("Found environment variable 'DB': overriding 'DB' field from config file")
self["DB"] = os.environ["DB"]
else:
logger.info("Environment variable 'DB' empty or not set: using 'DB' field from config file")

if "ROOT_URL" not in self._configs and "BASE_URL" in self._configs:
url = urllib.parse.urlparse(self._configs["BASE_URL"])
Expand Down

0 comments on commit 230e11b

Please sign in to comment.