Skip to content
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

docs: add documentation for process.traceProcessWarnings #53641

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AlirezaEbrahimkhani
Copy link

Add documentation for the process.traceProcessWarnings property in the process module. This property allows for programmatic control of warning trace settings in Node.js applications and was previously undocumented despite being available since Node.js v6.x.

resolves #53514

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem. labels Jun 29, 2024
Copy link
Member

@RedYetiDev RedYetiDev left a comment

Choose a reason for hiding this comment

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

These are only my suggestions, and are not blocking, nor do they have the power to.

## `process.traceProcessWarnings`

<!-- YAML
added: v6.x
Copy link
Member

Choose a reason for hiding this comment

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

This should be the exact version, rather than the .x semver

Comment on lines 3838 to 3840
The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag is set on the current Node.js process. This property allows programmatic control over the tracing of warnings, enabling or disabling stack traces for warnings at runtime.

Setting this property to `true` enables the tracing of warnings, akin to launching the process with the `--trace-warnings` command-line option. Conversely, setting it to `false` disables the tracing.
Copy link
Member

Choose a reason for hiding this comment

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

I think this can be condensed, as some information is repeated (such as what the API does)

Copy link
Member

@RedYetiDev RedYetiDev left a comment

Choose a reason for hiding this comment

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

Keep in mind, I'm just a triage member. When the collaborators get a chance to check out this PR, they will be able to provide better reviews than I.

This is not approving nor blocking.


The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag is set on the current Node.js process. This property allows programmatic control over the tracing of warnings, enabling or disabling stack traces for warnings at runtime.

```mjs
Copy link
Member

Choose a reason for hiding this comment

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

This should be a js block, not mjs.

@AlirezaEbrahimkhani
Copy link
Author

@RedYetiDev
Thanks, for your initial review and comments on the pull request. I'm looking forward to more detailed feedback from the rest of the collaborators soon. Thanks again for your contributions and for giving feedback to me.


* {boolean}

The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag is set on the current Node.js process. This property allows programmatic control over the tracing of warnings, enabling or disabling stack traces for warnings at runtime.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag is set on the current Node.js process. This property allows programmatic control over the tracing of warnings, enabling or disabling stack traces for warnings at runtime.
The `process.traceProcessWarnings` property indicates whether the `--trace-warnings` flag
is set on the current Node.js process. This property allows programmatic control over the
tracing of warnings, enabling or disabling stack traces for warnings at runtime.

Choose a reason for hiding this comment

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

Thanks for pointing this out and I made the change you have requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. process Issues and PRs related to the process subsystem.
4 participants