Spaces:
Sleeping
Sleeping
Download app/common/logging_utils.py from TheJackBright/polyguard-openenv: direct link, hf CLI and curl.
- Browser
- Download file 436 Bytes
-
https://huggingface.co/spaces/TheJackBright/polyguard-openenv/resolve/main/app/common/logging_utils.py
- Command line
-
hf download hf://spaces/TheJackBright/polyguard-openenv/app/common/logging_utils.py
-
curl -L -o logging_utils.py https://huggingface.co/spaces/TheJackBright/polyguard-openenv/resolve/main/app/common/logging_utils.py
436 Bytes
| """Logging utilities.""" | |
| from __future__ import annotations | |
| import logging | |
| from typing import Optional | |
| def configure_logging(level: str = "INFO") -> None: | |
| logging.basicConfig( | |
| level=getattr(logging, level.upper(), logging.INFO), | |
| format="%(asctime)s | %(levelname)s | %(name)s | %(message)s", | |
| ) | |
| def get_logger(name: Optional[str] = None) -> logging.Logger: | |
| return logging.getLogger(name or "polyguard") | |