Skip to content

(v6.x backport) process: add --redirect-warnings command line argument

The --redirect-warnings command line argument allows process warnings to be written to a specified file rather than printed to stderr.

Also adds an equivalent NODE_REDIRECT_WARNINGS environment variable.

If the specified file cannot be opened or written to for any reason, the argument is ignored and the warning is printed to stderr.

If the file already exists, it will be appended to.

PR-URL: https://github.com/nodejs/node/pull/10116 Reviewed-By: Michael Dawson michael_dawson@ca.ibm.com Reviewed-By: Michal Zasso targos@protonmail.com Reviewed-By: Fedor Indutny fedor.indutny@gmail.com

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

Merge request reports

Loading