Skip to content

fix: use correct stream type when initializing stderr log file#242

Closed
gumruyanzh wants to merge 1 commit intojetzig-framework:mainfrom
gumruyanzh:fix-stderr-log-file
Closed

fix: use correct stream type when initializing stderr log file#242
gumruyanzh wants to merge 1 commit intojetzig-framework:mainfrom
gumruyanzh:fix-stderr-log-file

Conversation

@gumruyanzh
Copy link

Summary

  • Fix typo in Environment.zig line 184: .stdout -> .stderr
  • The --log-error CLI option was being silently ignored

Problem

In Environment.init(), the stderr log file was being initialized with .stdout instead of .stderr:

// Before (line 184):
const stderr = try getLogFile(.stdout, options.options);
// After:
const stderr = try getLogFile(.stderr, options.options);

This caused getLogFile to use options.log (the stdout log path) instead of options.@"log-error" (the stderr log path) for the error log file. Both log streams ended up with the same destination configuration, and the --log-error option was effectively ignored.

Test plan

  • zig build succeeds
  • zig build test --summary all - all tests pass

🤖 Generated with Claude Code

Line 184 passed `.stdout` instead of `.stderr` to `getLogFile()` when
initializing the stderr log file. This caused the `--log-error` option
to be ignored, with both stdout and stderr logs using the same
destination configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@gumruyanzh gumruyanzh closed this by deleting the head repository Feb 27, 2026
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