-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
Missing documentation for process.traceProcessWarnings #53514
Comments
If you make a PR modifying the docs, the project will be happy to review it :-) |
Huh, I don't remember, it seems like it's there from the start - @jasnell any idea? |
AlirezaEbrahimkhani
added a commit
to AlirezaEbrahimkhani/node
that referenced
this issue
Jun 29, 2024
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 nodejs#53514
AlirezaEbrahimkhani
added a commit
to AlirezaEbrahimkhani/node
that referenced
this issue
Jun 30, 2024
AlirezaEbrahimkhani
added a commit
to AlirezaEbrahimkhani/node
that referenced
this issue
Jul 4, 2024
AlirezaEbrahimkhani
added a commit
to AlirezaEbrahimkhani/node
that referenced
this issue
Jul 4, 2024
AlirezaEbrahimkhani
added a commit
to AlirezaEbrahimkhani/node
that referenced
this issue
Jul 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Affected URL(s)
From https://nodejs.org/docs/latest/api/process.html
To https://nodejs.org/docs/latest-v6.x/api/process.html
Description of the problem
I wanted to set
--trace-warnings
programmaticaly at runtime from within node.I noticed:
node/lib/internal/process/warning.js
Lines 114 to 115 in 67c19c2
So I can use
process.traceProcessWarnings = true
at runtime to toggle stack trace on warnings.Important
However in the documentation, from version
6.X LTS
to latest22.X
, this fieldprocess.traceProcessWarnings
is never documented but the fieldprocess.traceDeprecation
is documented (https://nodejs.org/docs/latest/api/process.html#processtracedeprecation).Btw, the documentation for the fields
process.traceDeprecation
,process.noDeprecation
could mention that they are mutable, just likeprocess.throwDeprecation
does since12.X LTS
:https://nodejs.org/docs/latest-v12.x/api/process.html#process_process_throwdeprecation
By #29495
It could be nice to document that.
Note
Also I noticed the
process.noProcessWarnings
does not work likeprocess.noDeprecation
:it won't change the behavior if assigned at runtime. For this case, using the
--no-warnings
is the only option.And I don't know why as this is not documented
Should I make a PR to add documentation
The text was updated successfully, but these errors were encountered: