Fix maximum level string lookup - #162
Merged
Merged
Conversation
Level descriptors define max_level as an inclusive boundary, but the string conversion rejected that final valid entry. Align the check with the existing validity rules and cover the default FATAL boundary. Constraint: Custom level descriptors also rely on an inclusive max_level Confidence: high Scope-risk: narrow Directive: Keep level string validation aligned with level_is_valid Tested: MinGW full CTest 16/16; strict -Wall -Wextra -Werror CoreTests; default and syslog boundary matrix Not-tested: Linux full suite because local WSL p9 access stalled
Owner
|
Nice! Thanks for the contribution ❤️ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Problem
Level descriptors and level_is_valid() both treat max_level as the final valid entry. The string conversion used a greater-than-or-equal check, so the configured maximum returned ? instead of its name. This affected the default FATAL level and the maximum entry of custom descriptors such as syslog EMERG.
Validation