Description
When running swamp model method run, framework-level log lines are written to stdout and intermixed with the model's own stdout output. This makes it impossible to pipe or redirect clean output from a model method without garbage lines at the top of the file.
Steps to Reproduce
- Create a model that writes formatted output to stdout (e.g. markdown tables)
- Run:
swamp model method run my-model myMethod > report.md
- Open
report.md
Expected Behavior
report.md should contain only the model's stdout output — clean, parseable content.
Actual Behavior
The file contains 3+ framework log lines before the model output:
Found model "my-model" ("@org/my-model")
Evaluating expressions
Executing method "myMethod"
These are framework-level info logs that should be written to stderr, not stdout, so that stdout remains clean for programmatic use.
Workaround
The -q / --quiet flag suppresses these lines:
swamp model method run my-model myMethod -q > report.md
However, the default behavior should respect the Unix convention of keeping stdout for data and stderr for diagnostics.
Suggested Fix
The model method run command's framework-level log output should be written to stderr instead of stdout. This affects the log rendering layer — the structured log entries themselves are fine, they just need to target the correct output stream.
Description
When running
swamp model method run, framework-level log lines are written to stdout and intermixed with the model's own stdout output. This makes it impossible to pipe or redirect clean output from a model method without garbage lines at the top of the file.Steps to Reproduce
swamp model method run my-model myMethod > report.mdreport.mdExpected Behavior
report.mdshould contain only the model's stdout output — clean, parseable content.Actual Behavior
The file contains 3+ framework log lines before the model output:
These are framework-level info logs that should be written to stderr, not stdout, so that stdout remains clean for programmatic use.
Workaround
The
-q/--quietflag suppresses these lines:However, the default behavior should respect the Unix convention of keeping stdout for data and stderr for diagnostics.
Suggested Fix
The model method run command's framework-level log output should be written to stderr instead of stdout. This affects the log rendering layer — the structured log entries themselves are fine, they just need to target the correct output stream.