Skip to content

Fix #3525: Make level name matching case-insensitive#3535

Merged
gabime merged 1 commit intogabime:v1.xfrom
ssam18:fix-issue-3525-case-insensitive-levels
Feb 9, 2026
Merged

Fix #3525: Make level name matching case-insensitive#3535
gabime merged 1 commit intogabime:v1.xfrom
ssam18:fix-issue-3525-case-insensitive-levels

Conversation

@ssam18
Copy link
Contributor

@ssam18 ssam18 commented Feb 4, 2026

This fixes the issue where uppercase level names in environment variables weren't recognized. The from_str() function now does case-insensitive matching, so SPDLOG_LEVEL="DEBUG" works just like "debug". All existing tests pass plus new tests verify uppercase and mixed-case level names work correctly.

Modified from_str() to perform case-insensitive comparison for all level names.
This allows environment variables and SPDLOG_LEVEL_NAMES to use uppercase or
mixed case level names (e.g., DEBUG, INFO, Warning) while maintaining full
backward compatibility with existing lowercase names.
@tt4g
Copy link
Contributor

tt4g commented Feb 4, 2026

Thank you for contribution but duplicate this PR: #3531

@SamareshSingh
Copy link

Hmm. I didn't realized it. Thanks for checking it

@gabime gabime merged commit 566b2d1 into gabime:v1.x Feb 9, 2026
12 of 14 checks passed
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.

4 participants