-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 2389- replaced logger unformatted strings with template literals #2499
fix: 2389- replaced logger unformatted strings with template literals #2499
Conversation
Created ChangeLog entry
IIUC, the placeholder style strings in loggers are designed to prevent generating redundant strings when the logger is not enabled. i.e. when debug level is disabled, the formatting can be evacuated and no new strings were generated in the case. Using JavaScript template strings in these places generates one-shot, unused strings when the diag logger is not enabled. |
That does not really matter if it doesn't work. It seems the original author expected the logger.debug('print this %s', 'string') // print this %s string This PR fixes a bug. Deferring the string building to later can be taken on as a future enhancement (possibly by adding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dyladan: Deferring the string building to later can be taken on as a future enhancement (possibly by adding logf type methods).
Sounds good to me. I'm 👍 on this PR if we are going to add the deferred string building in follow-up PRs.
@PaurushGarg please update the branch so it can be merged |
@dyladan Thanks. I updated the branch, as suggested. |
This test failure is my fault and will be fixed with #2511 |
Which problem is this PR solving?
Short description of the changes