Repository navigation
Open
Labels
Description
Summary
Consolidate and unify logging (log/slog), CLI/Desktop output & logging flags (STDOUT vs STDERR), and operational telemetry/analytics across the Devsy CLI, Desktop app, and all 15 external provider repositories in devsy-org (plus devsy-runtime-sdk and built-in drivers).
1. Uniform CLI & Desktop Flag Contract (STDOUT vs STDERR)
| Concern | Stream | Canonical Flag | Environment Variable (BindEnv) |
Allowed Values | Default |
|---|---|---|---|---|---|
| Log Verbosity | STDERR |
--log-level |
DEVSY_LOG_LEVEL (fallback: context LOG_LEVEL) |
error, warn, info, debug, trace |
warn (CLI) / info (remote agent) |
| Log Encoding | STDERR |
--log-format |
DEVSY_LOG_FORMAT |
auto, text, json, logfmt (alias: plain -> text) |
auto (text on TTY, json when piped / DEVSY_UI=true / internal) |
| Result Format | STDOUT |
--result-format |
DEVSY_RESULT_FORMAT |
auto, text, plain, json |
auto (plain/text on TTY, json when piped / DEVSY_UI=true) |
| Live Progress | STDOUT |
--no-status |
DEVSY_NO_STATUS |
true, false |
false |
Removed Redundant Flags
-v/-vv/-vvv(--verbose) -> Replaced by--log-level=info|debug|trace--debug($DEVSY_DEBUG) -> Replaced by--log-level=debug-q/--quiet-> Replaced by--log-level=error(and--no-status)--log-output(and invalid--log-output=rawusages) -> Replaced by--log-format- Per-command
--json(e.g.devsy provider versions --json) -> Replaced by global--result-format
2. Organization-Wide Repository Audit (devsy-org — All 37 Repositories)
| Category | Repositories | Current Logging Mechanism | Planned Action |
|---|---|---|---|
| 1. Core Monorepo (1) | devsy |
pkg/log (zap), desktop/src/main/logging.ts |
Migrate pkg/log to log/slog, unify CLI/Desktop flags, streamer, status, and telemetry (#1842–#1848). |
2. Go Providers Importing devsy/pkg/log (12) |
Machine (8): devsy-provider-aws, devsy-provider-gcloud, devsy-provider-azure, devsy-provider-digitalocean, devsy-provider-civo, devsy-provider-terraform, devsy-provider-lima, devsy-provider-orbstackCustom Driver (3): devsy-provider-kubernetes (also has direct go.uber.org/zap in go.mod), devsy-provider-ecs, devsy-provider-dockerlessProxy (1): devsy-provider-ssh |
All 12 use cmd/root.go:cfg := log.Config{Verbosity: 1}if os.Getenv("DEVSY_DEBUG") == "true" { cfg.Debug = true }log.Init(cfg) |
Add log.InitProvider(providerName) in devsy/pkg/log (retaining Verbosity/Debug as deprecated compatibility shims on log.Config), bump github.com/devsy-org/devsy in all 12 repos, switch cmd/root.go to log.InitProvider("<name>"), and remove direct zap from devsy-provider-kubernetes (#1845). |
| 3. Standalone Go Machine Providers (2) | devsy-provider-docker-sandbox, devsy-provider-harvester |
Standalone Go binaries (do not import devsy; minimal go.mod) invoked via machineExecutor. |
Configure stdlib log/slog JSON handler on os.Stderr honoring DEVSY_LOG_LEVEL and DEVSY_LOG_FORMAT=json (#1845). |
| 4. Runtime SDK & External Plugin Providers (2) | devsy-runtime-sdk, devsy-provider-microsandbox |
hashicorp/go-plugin + go-hclog (Stderr streamed to host). |
Add stdlib slog helper in devsy-runtime-sdk/log, adopt it in devsy-provider-microsandbox, and route plugin Stderr through JSONLogStreamer (#1845). |
| 5. Legacy Logging Repo (1) | devsy-org/log |
Legacy April 2026 repo wrapping zap + logrus + survey. Unused by any active repo. |
Archive/deprecate devsy-org/log on GitHub with README notice pointing to github.com/devsy-org/devsy/pkg/log (#1843). |
6. K8s / SSH Libraries Imported by devsy (5) |
ssh, api, apiserver, agentapi, admin-apis |
ssh has zero logging deps; api, apiserver, agentapi, admin-apis use k8s.io/klog/v2. |
Automatically covered by pkg/log/logr.go migration from zapr to logr.FromSlogHandler (#1843). |
| 7. Out-of-Scope / Non-Provider Repos (14) | platform, k8s-apiserver, charts, agents, operating-system, examples, example-dotfiles, homebrew-tap, cla-signatures, cla-assistant-action, tailscale, docs, devsy-javascript-client, test_private_repo |
Static assets, Helm charts, CLA actions, forks, or legacy repos. | No changes required. |
3. Workstream Dependency Graph
flowchart LR
W0["#1842 W0: CLI & Desktop Flag Unification"] --> W1["#1843 W1: Core pkg/log slog Engine"]
W1 --> W2["#1844 W2: JSONLogStreamer & Remote Agent"]
W0 --> W4["#1846 W4: Desktop Logging & IPC"]
W1 --> W5["#1847 W5: Unified Telemetry & Metrics"]
W2 --> W3["#1845 W3: All 15 Provider Repos & Runtime SDK"]
W3 --> W5
W2 --> W6["#1848 W6: Gradual Call-Site Migration & Linter"]
4. Workstream Tracking Checklist
- [Feature]: W0: Uniform CLI & Desktop Flag & Stream Contract (--log-level, --log-format, --result-format, --no-status) #1842 — W0: Uniform CLI & Desktop Flag & Stream Contract (Tasks 0.1–0.3)
- [Feature]: W1: Core pkg/log Standard Library (log/slog) Engine & zap Removal #1843 — W1: Core
pkg/logStandard Library (log/slog) Engine,zapRemoval & Archivedevsy-org/log(Tasks 1.1–1.5, depends on [Feature]: W0: Uniform CLI & Desktop Flag & Stream Contract (--log-level, --log-format, --result-format, --no-status) #1842) - [Feature]: W2: Subprocess JSONLogStreamer Attribute Preservation & Remote Agent Log Level Propagation #1844 — W2: Subprocess
JSONLogStreamerAttribute Preservation & Remote Agent Log Level Propagation (Tasks 2.1–2.2, depends on [Feature]: W1: Core pkg/log Standard Library (log/slog) Engine & zap Removal #1843) - [Feature]: W3: Provider Logging Unification Across All 15 External Provider Repos, devsy-runtime-sdk & Drivers #1845 — W3: Provider Logging Unification Across All 15 External Provider Repos,
devsy-runtime-sdk& Built-in Drivers (Tasks 3.1–3.7, depends on [Feature]: W2: Subprocess JSONLogStreamer Attribute Preservation & Remote Agent Log Level Propagation #1844) - [Feature]: W4: Desktop Structured Logger & CLI-to-Desktop IPC Stream Unification #1846 — W4: Desktop Structured Logger & CLI-to-Desktop IPC Stream Unification (Tasks 4.1–4.3, depends on [Feature]: W0: Uniform CLI & Desktop Flag & Stream Contract (--log-level, --log-format, --result-format, --no-status) #1842)
- [Feature]: W5: Unified Telemetry Schema, Identity Parity & Operational Metrics (pkg/status -> pkg/telemetry) #1847 — W5: Unified Telemetry Schema, Identity Parity & Operational Metrics (
pkg/status->pkg/telemetry) (Tasks 5.1–5.4, depends on [Feature]: W1: Core pkg/log Standard Library (log/slog) Engine & zap Removal #1843, [Feature]: W3: Provider Logging Unification Across All 15 External Provider Repos, devsy-runtime-sdk & Drivers #1845) - [Feature]: W6: Gradual Structured slog Call-Site Migration & Linter Guardrails (sloglint + depguard) #1848 — W6: Gradual Structured
slogCall-Site Migration & Linter Guardrails (sloglint+depguard) (Tasks 6.1–6.2, depends on [Feature]: W2: Subprocess JSONLogStreamer Attribute Preservation & Remote Agent Log Level Propagation #1844)
Reacted by coderabbitai
Activity
coderabbitai commentedon Nov 15, 2026
🔗 Related PRs
#1828 - fix(docker): bound live output so blocked writers cannot hang docker commands [merged]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!