 
|
96199c4fee
|
feat(cli): add langgraph deploy logs subcommand (#7100)
Add a `langgraph deploy logs` subcommand to fetch build and
deploy/server logs from LangSmith deployments.
## Changes
- **`host_backend.py`**: Add `get_build_logs()` and `get_deploy_logs()`
methods, plus `langsmith_url` support.
- **`helpers.py`** (new): Log formatting (`format_log_entry`,
`format_timestamp`, `level_fg`) and resolution helpers
(`resolve_deployment_id`).
## Usage
```bash
# Deploy logs (latest 10)
langgraph deploy logs --deployment-id <id> --limit 10
# Error logs by name
langgraph deploy logs --name gtm-agent --level ERROR
# Build logs
langgraph deploy logs --deployment-id <id> --type build
# Tail logs (Ctrl+C to stop)
langgraph deploy logs --name gtm-agent --follow
```
## Tests
56 unit tests passing covering host backend methods, log formatting, and
helper functions.
---------
Co-authored-by: hari-dhanushkodi <hari@langchain.dev>
|
2026-03-12 09:01:44 -07:00 |
|