Skip to content

fix - change the way the log level is mapped#22

Merged
DanielMuller merged 1 commit intoserverless-guru:mainfrom
ljsomm:bugfix/log-level-zero-mapping
Mar 21, 2025
Merged

fix - change the way the log level is mapped#22
DanielMuller merged 1 commit intoserverless-guru:mainfrom
ljsomm:bugfix/log-level-zero-mapping

Conversation

@ljsomm
Copy link
Contributor

@ljsomm ljsomm commented Mar 21, 2025

Problematic case:

Whenever we try to map debug level to it's equivalent number representation (0) and check if it was corrected map by using pipes (||) we might receive an undesired behavior:

image

Given that, a good alternative is to use nullable coalescing operator (??), so in this scenario the problem won't happen:

image

@ljsomm ljsomm force-pushed the bugfix/log-level-zero-mapping branch from cd2d6c2 to bf59600 Compare March 21, 2025 14:13
@DanielMuller DanielMuller merged commit 649d1b0 into serverless-guru:main Mar 21, 2025
2 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.

3 participants