zeroclaw should log to stderr instead of stdout
#4,721 opened on Mar 26, 2026
Repository metrics
- Stars
- (31,341 stars)
- PR merge metrics
- (Avg merge 3d 17h) (778 merged PRs in 30d)
Description
I was surprised to see that zeroclaw logs to stdout instead of stderr. This makes it hard to use the output of commands like zeroclaw config schema becaues it includes logs in the output:
zeroclaw config schema 2>/dev/null | head
2026-03-26T02:06:56.927469Z INFO zeroclaw::config::schema: Config loaded path=/home/zeroclaw/.zeroclaw/config.toml workspace=/home/zeroclaw/.zeroclaw/workspace source="default" initialized=true
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Config",
"description": "Top-level ZeroClaw configuration, loaded from `config.toml`.\n\nResolution order: `ZEROCLAW_WORKSPACE` env → `active_workspace.toml` marker → `~/.zeroclaw/config.toml`.",
"type": "object",
"properties": {
"agent": {
"description": "Agent orchestration settings (`[agent]`).",
"$ref": "#/$defs/AgentConfig",
If you pass the output of zeroclaw config schema to jq, it will fail to parse. Of course, you can change to a higher log level with RUST_LOG=fatal zeroclaw config schema but logging to stderr is a best practice and lets you still see logs while piping stdout to another process.
I'm happy to open a PR to change the logging to stderr if you agree. It's as simple as adding a line to change the output from the default of io::stdout to io::stderr here:
You just need to add this to the method call chain:
.with_writer(std::io::stderr)