Skip to content

Node.js: Use console.warn instead of stderr.write #1135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 19, 2024
Merged

Node.js: Use console.warn instead of stderr.write #1135

merged 1 commit into from
Feb 19, 2024

Conversation

callahad
Copy link
Collaborator

@callahad callahad commented Feb 19, 2024

Functionally identical, but marginally more idiomatic.

Refines: fbeb206

cc: @javorszky

For reference, Node's console docs are here: https://nodejs.org/docs/latest-v20.x/api/console.html

console.warn is an alias for console.error, and console.error is documented as: "Prints to stderr with newline." The console global has been present since the very earliest releases of Node.

Functionally identical, but marginally more idiomatic.

Refines: fbeb206
Copy link
Contributor

@javorszky javorszky left a comment

Choose a reason for hiding this comment

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

this makes a lot more sense here, thank you!

@callahad callahad merged commit 756feaf into nginx:master Feb 19, 2024
@callahad callahad deleted the node-console-warn branch February 19, 2024 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants