Skip to content

refactor: set log level explicitly instead of mutating RUST_LOG - #492

Merged
DeveloperC286 merged 2 commits into
mainfrom
claude/unsafe-set-var-main-i6fgk5
Jul 21, 2026
Merged

refactor: set log level explicitly instead of mutating RUST_LOG#492
DeveloperC286 merged 2 commits into
mainfrom
claude/unsafe-set-var-main-i6fgk5

Conversation

@DeveloperC286

@DeveloperC286 DeveloperC286 commented Jul 21, 2026

Copy link
Copy Markdown
Owner

std::env::set_var is unsafe in Rust 2024 and mutating a process-wide env
var before pretty_env_logger reads it is a footgun. Build the logger via
formatted_builder() instead.

claude added 2 commits July 21, 2026 21:18
std::env::set_var is unsafe in Rust 2024 and mutating a process-wide env
var before pretty_env_logger reads it is a footgun. Build the logger via
formatted_builder() instead: parse RUST_LOG when set (preserving its
precedence) and otherwise default to the info level when --verbose is
passed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LhirbVDPWoicNDeB5paDy
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LhirbVDPWoicNDeB5paDy
@DeveloperC286 DeveloperC286 changed the title Build logger explicitly instead of mutating RUST_LOG refactor: set log level explicitly instead of mutating RUST_LOG Jul 21, 2026
@DeveloperC286
DeveloperC286 merged commit 4b07e77 into main Jul 21, 2026
32 of 33 checks passed
@DeveloperC286
DeveloperC286 deleted the claude/unsafe-set-var-main-i6fgk5 branch July 21, 2026 21:31
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.

2 participants