mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[Feature] Add logging parameters and error output to terminal (#7098)
This commit is contained in:
@@ -15,9 +15,24 @@ environment_variables: dict[str, Callable[[], Any]] = {
|
||||
# Log directory
|
||||
"FD_LOG_DIR": lambda: os.getenv("FD_LOG_DIR", "log"),
|
||||
|
||||
# Global log level, prefer this over FD_DEBUG. Supports "INFO" and "DEBUG".
|
||||
"FD_LOG_LEVEL": lambda: os.getenv("FD_LOG_LEVEL", None),
|
||||
|
||||
# Enable debug mode (0 or 1)
|
||||
"FD_DEBUG": lambda: int(os.getenv("FD_DEBUG", "0")),
|
||||
|
||||
# Request logging master switch. Set to 0 to disable request logging.
|
||||
"FD_LOG_REQUESTS": lambda: int(os.getenv("FD_LOG_REQUESTS", "1")),
|
||||
|
||||
# Request logging detail level (0-3). Higher level means more verbose output.
|
||||
"FD_LOG_REQUESTS_LEVEL": lambda: int(os.getenv("FD_LOG_REQUESTS_LEVEL", "0")),
|
||||
|
||||
# Max field length for request logging truncation.
|
||||
"FD_LOG_MAX_LEN": lambda: int(os.getenv("FD_LOG_MAX_LEN", "2048")),
|
||||
|
||||
# Unified trace mode: off, local, otel, all.
|
||||
"FD_TRACE": lambda: os.getenv("FD_TRACE", "off"),
|
||||
|
||||
# FastDeploy log retention days
|
||||
"FD_LOG_BACKUP_COUNT": lambda: os.getenv("FD_LOG_BACKUP_COUNT", "7"),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user