refactor(logging): use printf-style formatting#7409
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #7409 +/- ##
=======================================
Coverage 80.56% 80.57%
=======================================
Files 731 731
Lines 31236 31233 -3
=======================================
- Hits 25166 25165 -1
+ Misses 6070 6068 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Overall package sizeSelf size: 4.49 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 2.0.3 | 76.87 kB | 808.03 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
This comment has been minimized.
This comment has been minimized.
0304c74 to
c214f53
Compare
ec78b86 to
f105a9c
Compare
Replace string concatenation and callback-style logging with printf-style formatting (%d, %s placeholders) for better performance and consistency. Merge multi-line concatenated strings into single strings with eslint max-len disables where needed to avoid unnecessary string operations.
f105a9c to
3e585f2
Compare
|
I don't want to prefix all of my long log lines with ignore comments... Can the AI write a rule to auto ignore line lengths for log lines? |
|
@tlhunter maybe, but I don't think it's really a problem. Normally a log line is not that long. We have close to 500 |
Replace string concatenation and callback-style logging with printf-style formatting (%d, %s placeholders) for better performance and consistency. Merge multi-line concatenated strings into single strings with eslint max-len disables where needed to avoid unnecessary string operations.
Replace string concatenation and callback-style logging with printf-style formatting (%d, %s placeholders) for better performance and consistency. Merge multi-line concatenated strings into single strings with eslint max-len disables where needed to avoid unnecessary string operations.
Replace string concatenation and callback-style logging with printf-style formatting (%d, %s placeholders) for better performance and consistency. Merge multi-line concatenated strings into single strings with eslint max-len disables where needed to avoid unnecessary string operations.
Replace string concatenation and callback-style logging with printf-style formatting (%d, %s placeholders) for better performance and consistency. Merge multi-line concatenated strings into single strings with eslint max-len disables where needed to avoid unnecessary string operations.

What does this PR do?
Refactors logging statements across the codebase, where appropriate, to use printf-style formatting (
%d,%splaceholders) instead of string concatenation and callback-style logging.The changes also merge multi-line concatenated strings into single strings, eliminating runtime string concatenation overhead.
Motivation
Improve performance by avoiding unnecessary string operations and provides more consistent logging patterns throughout the tracer.
Additional notes
The new ESLint rule is written by AI, and I have only reviewed it briefly. But I think that's ok since it's just an ESLint rule.