Skip to content

Commit

Permalink
Load logger configuration from path defined in ENV_CONFIG_FILE_PATH (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuyuhui97 authored Sep 14, 2024
1 parent 8cbcc2c commit a3ff357
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def format(self, record):
def get_logger():
"""Return logger."""
logger = logging.getLogger()
logger_config = get_logger_config(config=read_config())
logger_config = get_logger_config(config=read_config(config_path=os.environ.get(ENV_CONFIG_FILE_PATH_KEY, DEFAULT_CONFIG_FILE_PATH)))
if logger_config:
level_name = logging.getLevelName(level=logger_config["level"].upper())
logger.setLevel(level=level_name)
Expand Down

0 comments on commit a3ff357

Please sign in to comment.