feat(logging): enhance logging configuration to support environment variable override for log level
This commit is contained in:
parent
0f607441c8
commit
6b900ccb60
|
|
@ -23,9 +23,11 @@ from app.gateway.routers import (
|
||||||
)
|
)
|
||||||
from deerflow.config.app_config import get_app_config
|
from deerflow.config.app_config import get_app_config
|
||||||
|
|
||||||
# Configure logging
|
# Configure logging with env override
|
||||||
|
import os
|
||||||
|
log_level = os.environ.get("LOG_LEVEL", "INFO").upper()
|
||||||
logging.basicConfig(
|
logging.basicConfig(
|
||||||
level=logging.INFO,
|
level=getattr(logging, log_level, logging.INFO),
|
||||||
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
||||||
datefmt="%Y-%m-%d %H:%M:%S",
|
datefmt="%Y-%m-%d %H:%M:%S",
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue