feat(logging): enhance logging configuration to support environment variable override for log level
This commit is contained in:
parent
db0ea1ab18
commit
b6189a9d1c
|
|
@ -23,9 +23,11 @@ from app.gateway.routers import (
|
|||
)
|
||||
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(
|
||||
level=logging.INFO,
|
||||
level=getattr(logging, log_level, logging.INFO),
|
||||
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
|
||||
datefmt="%Y-%m-%d %H:%M:%S",
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue