Skip to content

projects: warn via stderr instead of log.Printf on pane-label failure#37

Merged
cloudmanic merged 1 commit into
mainfrom
fix-pane-label-warning-output
Jul 5, 2026
Merged

projects: warn via stderr instead of log.Printf on pane-label failure#37
cloudmanic merged 1 commit into
mainfrom
fix-pane-label-warning-output

Conversation

@cloudmanic

Copy link
Copy Markdown
Owner

Small follow-up to #33 (thanks again @javimb!).

The pane-label failure warning added in #33 used log.Printf:

log.Printf("warning: failed to label pane %d in tab %q: %v", j+1, t.Name, err)

That stamps a log-package timestamp prefix and pulls in the log package solely for this one line — inconsistent with the rest of the plugin, which emits messages via fmt to stdout/stderr with a herdr-plus: prefix (what herdr captures in the plugin log). This switches it to match:

// Labeling is cosmetic — warn but keep building the workspace.
fmt.Fprintf(os.Stderr, "herdr-plus: failed to label pane %d in tab %q: %v\n", j+1, t.Name, err)

and drops the now-unused log import.

Behavior is unchanged — labeling stays best-effort and a failure never aborts building the workspace. go build, go test, and go vet all pass.

Follow-up to #33. The pane-label failure warning used log.Printf, which stamps a
timestamp prefix and pulled in the log package solely for this one line — unlike
the rest of the plugin, which emits messages via fmt to stdout/stderr with a
"herdr-plus:" prefix (captured in the plugin log). Match that convention and drop
the now-unused log import. Behavior is unchanged: labeling stays best-effort and a
failure never aborts building the workspace.
@cloudmanic cloudmanic merged commit e7025db into main Jul 5, 2026
2 checks passed
@cloudmanic cloudmanic deleted the fix-pane-label-warning-output branch July 5, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant