Skip to content

Commit 9f75b66

Browse files
committed
Fix missing logger -> log replacements
1 parent 3294e3e commit 9f75b66

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ __pycache__/
55
**/*.secret
66
.DS_Store
77
.tox/
8+
**/.ruff_cache
89

910
# Ignore local dev helpers
1011
test-values.y[a]ml

web-apps/utils/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ def get_logger():
2424
structlog.configure(wrapper_class=structlog.make_filtering_bound_logger(log_level))
2525
return structlog.get_logger()
2626

27+
log = get_logger()
2728

2829
class LLMParams(BaseModel):
2930
"""
@@ -49,7 +50,7 @@ def get_k8s_namespace():
4950
try:
5051
current_k8s_namespace = open(NAMESPACE_FILE_PATH).read()
5152
return current_k8s_namespace
52-
except FileNotFoundError as err:
53+
except FileNotFoundError:
5354
return None
5455

5556

@@ -58,7 +59,7 @@ def api_address_in_cluster():
5859
if k8s_ns:
5960
return f"http://llm-backend.{k8s_ns}.svc"
6061
else:
61-
logger.warning(
62+
log.warning(
6263
"Failed to determine k8s namespace from %s - assuming non-kubernetes environment.",
6364
NAMESPACE_FILE_PATH,
6465
)
@@ -89,7 +90,7 @@ def load_settings() -> dict:
8990
# Sanity checks on settings
9091
unused_overrides = [k for k in overrides.keys() if k not in defaults.keys()]
9192
if unused_overrides:
92-
logger.warning(
93+
log.warning(
9394
f"Overrides {unused_overrides} not part of default settings so may be ignored."
9495
"Please check for typos"
9596
)

0 commit comments

Comments
 (0)