Commit 167627a
fix(cli): route logs to stderr when --json flag is active
Plugin loading emits console.log messages to stdout, which corrupts
JSON output for commands like `openclaw agents list --json`. Call
routeLogsToStderr() in the preAction hook before plugin loading when
--json mode is detected, matching the existing pattern in completion-cli.
Fixes #52032
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>1 parent f6c57ed commit 167627a
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
147 | 151 | | |
148 | 152 | | |
149 | 153 | | |
| |||
0 commit comments