aws / aws/model-hosting-container-standards

[Bugfix] Update log_level parsing to use parse_level from #27

Open
#28 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
7
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Currently `StandardSupervisor` class method `_setup_logger` has the same issue fixed by #26 #27 where it cannot handle case where log level env variable is specified as an int (read as string).

We want to update this so it can handle this case as well as silently fallback to a specific level (e.g. ERROR) if parse fails.

https://github.com/aws/model-hosting-container-standards/blob/3a1411671caad8580fe214f990db3f1ae0237f5c/python/model_hosting_container_standards/supervisor/scripts/standard_supervisor.py#L116-L119

See `parse_level`:

https://github.com/aws/model-hosting-container-standards/blob/3a1411671caad8580fe214f990db3f1ae0237f5c/python/model_hosting_container_standards/logging_config.py#L9-L25

Contributor guide

Open the contributing guide

Research direction

Start in python/model_hosting_container_standards/supervisor/scripts/standard_supervisor.py at StandardSupervisor._setup_logger, then read parse_level in python/model_hosting_container_standards/logging_config.py. Update the log-level handling so integer values supplied through the environment work and invalid values silently fall back to a specific level such as ERROR. Confirm the logger uses the parsed or fallback level.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.