Spaces:
Runtime error
Runtime error
Upload 2 files
Browse files- core/core/__init__.py +1 -0
- core/core/logging.py +18 -0
core/core/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"""Core application utilities."""
|
core/core/logging.py
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Logging configuration for the Streamlit application.
|
| 2 |
+
|
| 3 |
+
This module intentionally lives at core/logging.py so it does not shadow
|
| 4 |
+
Python's standard-library logging module.
|
| 5 |
+
"""
|
| 6 |
+
|
| 7 |
+
from __future__ import annotations
|
| 8 |
+
|
| 9 |
+
import logging
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
def configure_logging(level: int = logging.INFO) -> logging.Logger:
|
| 13 |
+
"""Configure basic application logging and return a module logger."""
|
| 14 |
+
logging.basicConfig(
|
| 15 |
+
level=level,
|
| 16 |
+
format="%(asctime)s | %(levelname)s | %(name)s | %(message)s",
|
| 17 |
+
)
|
| 18 |
+
return logging.getLogger(__name__)
|