refactor(logger): use template literal instead of node:util format - #2283
Conversation
|
dreamorosi
left a comment
There was a problem hiding this comment.
Thanks for the PR, I was concerned about the security of using template literals directly and opted for using the format utility but after reviewing the PR I think it should be safe to use them.
The awsLogLevel comes from the environment variable and it's set by the service, the other value (selectedLogLevel) can come from other sources but it's still validated against an allow list before being printed, so effectively we should be able to consider the two inputs safe to the extent of the rest of the code/execution environment.
|
Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience! |




Description of your changes
Updated the logging for warning message that indicates a mismatch with the Advanced Logging Controls minimum log level. Now, a template literal is used instead of the format function from the
node:utilpackage. This change addresses the sole instance where thenode:utilpackage was used, which prevented the use with LLRT.Related issues, RFCs
Issue number: #2050
Checklist
Breaking change checklist
Is it a breaking change?: NO
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.