Summary
Sharpmake appears to emit error-level output via Console.Write(...) (stdout) instead of Console.Error (stderr).
In CI systems (e.g., TeamCity), this causes [ERROR] lines to be displayed as normal logs, even when the process exits non-zero.
Why this matters
Many CI runners classify/format logs by stream:
- stdout -> normal log
- stderr -> error log
When Sharpmake writes errors to stdout, CI cannot reliably highlight or classify error lines as errors.
Observed behavior
Example output includes error text like:
[ERROR]
Error:
- exception details
But these lines are emitted on stdout, not stderr.
Expected behavior
Error and warning-level logs should be written to stderr (or at least provide an option to do so), while informational logs remain on stdout.
Suggested fix
When severity is error (and possibly warning), write to Console.Error instead of Console.Write / Console.Out.
For example, in logging flow (ErrorWrite -> LogWrite):
- if severity == error =>
Console.Error.Write(...)
- else =>
Console.Write(...)
Environment
- Sharpmake.Application.exe (custom/forked usage in CI)
- TeamCity Command Line runner
- Problem reproducible when process exits with error: CI sees failure code, but log lines remain unclassified as normal output
Summary
Sharpmake appears to emit error-level output via
Console.Write(...)(stdout) instead ofConsole.Error(stderr).In CI systems (e.g., TeamCity), this causes
[ERROR]lines to be displayed as normal logs, even when the process exits non-zero.Why this matters
Many CI runners classify/format logs by stream:
When Sharpmake writes errors to stdout, CI cannot reliably highlight or classify error lines as errors.
Observed behavior
Example output includes error text like:
[ERROR]Error:But these lines are emitted on stdout, not stderr.
Expected behavior
Error and warning-level logs should be written to stderr (or at least provide an option to do so), while informational logs remain on stdout.
Suggested fix
When severity is error (and possibly warning), write to
Console.Errorinstead ofConsole.Write/Console.Out.For example, in logging flow (
ErrorWrite->LogWrite):Console.Error.Write(...)Console.Write(...)Environment