Add --json-log flag to enable structured JSON logging (#19968)
Co-authored-by: github_username <github_email> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
github_username <github_email>
Claude Opus 4.6
parent
41fd53fe37
commit
e58391dd7d
@@ -45,6 +45,7 @@ class RouterArgs:
|
||||
api_key: Optional[str] = None
|
||||
log_dir: Optional[str] = None
|
||||
log_level: Optional[str] = None
|
||||
json_log: bool = False
|
||||
# Service discovery configuration
|
||||
service_discovery: bool = False
|
||||
selector: Dict[str, str] = dataclasses.field(default_factory=dict)
|
||||
@@ -413,6 +414,11 @@ class RouterArgs:
|
||||
choices=["debug", "info", "warn", "error"],
|
||||
help="Set the logging level. If not specified, defaults to INFO.",
|
||||
)
|
||||
logging_group.add_argument(
|
||||
f"--{prefix}json-log",
|
||||
action="store_true",
|
||||
help="Enable structured JSON log output instead of plain text.",
|
||||
)
|
||||
|
||||
# Service discovery configuration
|
||||
k8s_group.add_argument(
|
||||
|
||||
Reference in New Issue
Block a user