Skip to content

Commit

Permalink
flip the env var lookups
Browse files Browse the repository at this point in the history
Signed-off-by: Yee Hing Tong <[email protected]>
  • Loading branch information
wild-endeavor committed Jan 19, 2023
1 parent cab9508 commit 3bc49c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions flytekit/loggers.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
flytekit_root_env_var = f"{LOGGING_ENV_VAR}_ROOT"
level_from_env = os.getenv(LOGGING_ENV_VAR)
root_level_from_env = os.getenv(flytekit_root_env_var)
if level_from_env is not None:
logger.setLevel(int(level_from_env))
elif root_level_from_env is not None:
if root_level_from_env is not None:
logger.setLevel(int(root_level_from_env))
elif level_from_env is not None:
logger.setLevel(int(level_from_env))
else:
logger.setLevel(logging.WARNING)

Expand Down

0 comments on commit 3bc49c1

Please sign in to comment.