Skip to content

Conversation

mertcanaltin
Copy link
Member

@mertcanaltin mertcanaltin commented Oct 3, 2025

hello everyone, last week we disscused this issues : #190,#60032, later we think related nodejs/performance this issue, and @RafaelGSS suggestion after I try create new util.log method for memory friendly log

this new log method : async buffering + batch writes provides

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/performance

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module. labels Oct 3, 2025
Copy link

codecov bot commented Oct 4, 2025

Codecov Report

❌ Patch coverage is 94.36620% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.44%. Comparing base (69144e9) to head (17755ff).
⚠️ Report is 45 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/util/log.js 96.39% 4 Missing ⚠️
src/node_util.cc 80.95% 0 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60116      +/-   ##
==========================================
- Coverage   88.45%   88.44%   -0.02%     
==========================================
  Files         703      704       +1     
  Lines      207796   207947     +151     
  Branches    40021    40046      +25     
==========================================
+ Hits       183806   183912     +106     
- Misses      15977    16021      +44     
- Partials     8013     8014       +1     
Files with missing lines Coverage Δ
lib/util.js 98.00% <100.00%> (+0.03%) ⬆️
lib/internal/util/log.js 96.39% <96.39%> (ø)
src/node_util.cc 80.40% <80.95%> (+0.03%) ⬆️

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@marco-ippolito
Copy link
Member

util.log is a deprecated api that has been removed.
It might be confusing to call it with the same name.
https://nodejs.org/docs/latest-v18.x/api/util.html#utillogstring

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

This has three problems:

  1. it can loose messages in certain exit circumstances (the system for adding this is already present, see #53239).
  2. it provides an odd dx where the messages are handled differently between development and production systems.
  3. util.format is faster than before but still problematic

I’m not convinced this is a good addition to Node.js, and we should focus on actually adding the log system #49296.

@RafaelGSS
Copy link
Member

I’m not convinced this is a good addition to Node.js, and we should focus on actually adding the log system #49296.

I agree and that was my suggestion actually 😄

Copy link
Member

@AugustinMauroy AugustinMauroy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

util.log has been used so if we introduce as it it's will be a massive breaking change

https://nodejs.org/docs/latest/api/deprecations.html#DEP0059

@mertcanaltin
Copy link
Member Author

I'll close this PR and contribute to #49296 instead. thanks for the reviews!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants