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 stringThis PR fixes a bug. Deferring the string building to later can be taken on as a future enhancement (possibly by adding |
legendecas
left a comment
There was a problem hiding this comment.
@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