fix: harden log level handling and stabilize test suite for v1.2.2 #66
No reviewers
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
javascript
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mburchard/bit-log!66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bughunt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR consolidates bug fixes, test hardening, and documentation updates for the 1.2.2 patch release.
Changes
LogLevelhandling across logger and appender entry pointsLogLevelvalues instead of silently accepting them1.2.2Why
Test plan
pnpm lintpassespnpm typecheckpassespnpm buildsucceeds- AbstractBaseAppender.level: convert from public property to getter/setter that normalises via toLogLevel() - Logger constructor and level getter fallback: normalise consistently - Logger.logEvent(): normalise level before writing to ILogEvent - AbstractBaseAppender.handle(): extract willHandle() guard into template method, subclasses implement doHandle() instead - Remove redundant toLogLevel() calls in shouldLog() and configureLogging() where values are already numeric - Update all test assertions to use toLogLevel('...') for readability