File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed
Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -4353,6 +4353,29 @@ documentation for the [`'warning'` event][process_warning] and the
43534353[` emitWarning ()` method][process_emit_warning] for more information about this
43544354flag's behavior.
43554355
4356+ ## ` process .traceProcessWarnings `
4357+
4358+ <!-- YAML
4359+ added: v6.10.0
4360+ -->
4361+
4362+ * {boolean}
4363+
4364+ The ` process .traceProcessWarnings ` property indicates whether the ` -- trace- warnings` flag
4365+ is set on the current Node.js process. This property allows programmatic control over the
4366+ tracing of warnings, enabling or disabling stack traces for warnings at runtime.
4367+
4368+ ` ` ` js
4369+ // Enable trace warnings
4370+ process .traceProcessWarnings = true ;
4371+
4372+ // Emit a warning with a stack trace
4373+ process .emitWarning (' Warning with stack trace' );
4374+
4375+ // Disable trace warnings
4376+ process .traceProcessWarnings = false ;
4377+ ` ` `
4378+
43564379## ` process .umask ()`
43574380
43584381<!-- YAML
You can’t perform that action at this time.
0 commit comments