Skip to content

Commit

Permalink
util: runtime deprecate util.log
Browse files Browse the repository at this point in the history
fix pr url

PR-URL: #50488
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
  • Loading branch information
marco-ippolito authored and nodejs-github-bot committed Nov 27, 2023
1 parent 6cf20d5 commit e96cd25
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1313,6 +1313,9 @@ The [`util.isUndefined()`][] API is deprecated.

<!-- YAML
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/50488
description: Runtime deprecation.
- version: v6.12.0
pr-url: https://github.com/nodejs/node/pull/10116
description: A deprecation code has been assigned.
Expand All @@ -1321,7 +1324,7 @@ changes:
description: Documentation-only deprecation.
-->

Type: Documentation-only
Type: Runtime

The [`util.log()`][] API is deprecated.

Expand Down
5 changes: 4 additions & 1 deletion lib/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,10 @@ module.exports = {
'Please use `arg === null || ' +
'(typeof arg !== "object" && typeof arg !== "function")` instead.',
'DEP0054'),
log: deprecate(log, 'The `util.log API is deprecated.', 'DEP0059'),
log: deprecate(log,
'The `util.log API is deprecated. ' +
'Please use console.log() with a custom formatter or a third-party logger instead.',
'DEP0059'),
promisify,
stripVTControlCharacters,
toUSVString,
Expand Down

0 comments on commit e96cd25

Please sign in to comment.