Skip to content

src: allow setting a dir for all diagnostic output - #33584

Closed
AshCripps wants to merge 4 commits into
nodejs:masterfrom
AshCripps:add-diagnostic-output
Closed

src: allow setting a dir for all diagnostic output#33584
AshCripps wants to merge 4 commits into
nodejs:masterfrom
AshCripps:add-diagnostic-output

Conversation

@AshCripps

Copy link
Copy Markdown
Member

Add a flag that allows for the setting of a directory where all
diagnostic output will be written to.
e.g. --redirect-warnings

refs: #33010 (comment)

f.y.i @sam-github

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

@nodejs-github-botnodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. process Issues and PRs related to the process subsystem. labels May 27, 2020
Comment threaddoc/api/cli.md Outdated
Comment threaddoc/api/cli.md Outdated

@sam-githubsam-github left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like the idea, I think it helps, a couple suggestions for consistency.

Comment threaddoc/api/cli.md Outdated
Comment threaddoc/api/cli.md Outdated
Comment threadsrc/node_options.cc Outdated
Comment threadsrc/node_options.h Outdated
@AshCripps
AshCrippsforce-pushed the add-diagnostic-output branch from 12a6f18 to 3606f54CompareMay 28, 2020 11:43
@AshCripps
AshCrippsforce-pushed the add-diagnostic-output branch from 7c7f2af to 9eb7c71CompareMay 29, 2020 11:57
@AshCrippsAshCripps changed the title [WIP] src: allow setting a dir for all diagnostic outputsrc: allow setting a dir for all diagnostic outputMay 29, 2020
@AshCripps
AshCripps marked this pull request as ready for review May 29, 2020 12:03
@richardlau

Copy link
Copy Markdown
Member

This could use some tests, particularly that the new option is only changing the default (i.e. if a more specific option is also used then the value of that is used instead of the more generic one).

Comment threaddoc/api/cli.md Outdated
Comment threaddoc/api/cli.md Outdated
Comment threaddoc/api/cli.md Outdated
Comment threaddoc/api/cli.md Outdated
Comment threaddoc/api/cli.md Outdated
Comment threaddoc/node.1 Outdated
@AshCripps
AshCrippsforce-pushed the add-diagnostic-output branch 2 times, most recently from 88645e3 to 10b123bCompareMay 29, 2020 17:04
@BridgeAR
BridgeARforce-pushed the master branch 2 times, most recently from 8ae28ff to 2935f72CompareMay 31, 2020 12:18
@AshCripps
AshCrippsforce-pushed the add-diagnostic-output branch from 10b123b to 00e69b6CompareJune 2, 2020 11:25
@AshCripps

Copy link
Copy Markdown
MemberAuthor

Ive added some testing for the --cpu-prof-dir option with use of diagnostic-dir (I adapted https://github.com/nodejs/node/blob/master/test/sequential/test-cpu-prof-dir-absolute.js) but before I write any more I would appreciate some feedback if these are correct as ive never written node test before so not 100% sure if this is the correct way.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threaddoc/api/cli.md Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Considering these two dir flags are still experimental, I think we could just emit a deprecation warning for them, and make them no-ops when --diagnostic-dir is set (IIUC that's what this PR effectively does). Eventually we can just remove them.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

um, on the other hand, maybe we would also want to allow the user to override these directories individually through --cpu-prof-dir and --heap-prof-dir even when --diagnostic-dir is set?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

thats what I intented with:

if(cpu_prof&&cpu_prof_dir.empty()&&!diagnostic_dir.empty()){cpu_prof_dir=diagnostic_dir;}

@AshCripps
AshCrippsforce-pushed the add-diagnostic-output branch from 0c0dd7c to f299035CompareJune 8, 2020 12:22
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@AshCripps
AshCrippsforce-pushed the add-diagnostic-output branch from 7e323a6 to 900e397CompareJuly 14, 2020 15:14
@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Jul 14, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@addaleaxaddaleax added cli Issues and PRs related to the Node.js command line interface. semver-minor PRs that contain new features and should be released in the next minor version. and removed process Issues and PRs related to the process subsystem. labels Jul 15, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

addaleax pushed a commit that referenced this pull request Jul 20, 2020
Add a flag that allows for the setting of a directory where all
diagnostic output will be written to.
e.g. --redirect-warnings
Refs: #33010 (comment)
PR-URL: #33584
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@addaleax

Copy link
Copy Markdown
Member

Landed in 242bfb6

cjihrig pushed a commit that referenced this pull request Jul 23, 2020
Add a flag that allows for the setting of a directory where all
diagnostic output will be written to.
e.g. --redirect-warnings
Refs: #33010 (comment)
PR-URL: #33584
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
MylesBorins pushed a commit that referenced this pull request Jul 27, 2020
Add a flag that allows for the setting of a directory where all
diagnostic output will be written to.
e.g. --redirect-warnings
Refs: #33010 (comment)
PR-URL: #33584
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
ruyadorno added a commit that referenced this pull request Jul 28, 2020
Notable changes:
dgram:
* (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
doc:
* add AshCripps to collaborators (AshCripps) #34494
* add HarshithaKP to collaborators (Harshitha K P) #34417
* add rexagod to collaborators (Pranshu Srivastava) #34457
* add release key for Richard Lau (Richard Lau) #34397
events:
* (SEMVER-MINOR) expand NodeEventTarget functionality (Anna Henningsen) #34057
src:
* (SEMVER-MINOR) allow preventing SetPromiseRejectCallback (Shelley Vohr) #34387
* (SEMVER-MINOR) allow setting a dir for all diagnostic output (AshCripps) #33584
worker:
* (SEMVER-MINOR) make MessagePort inherit from EventTarget (Anna Henningsen) #34057
PR-URL: TODO
@ruyadornoruyadorno mentioned this pull request Jul 28, 2020
ruyadorno added a commit that referenced this pull request Jul 28, 2020
Notable changes:
dgram:
* (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
doc:
* add AshCripps to collaborators (AshCripps) #34494
* add HarshithaKP to collaborators (Harshitha K P) #34417
* add rexagod to collaborators (Pranshu Srivastava) #34457
* add release key for Richard Lau (Richard Lau) #34397
events:
* (SEMVER-MINOR) expand NodeEventTarget functionality (Anna Henningsen) #34057
src:
* (SEMVER-MINOR) allow preventing SetPromiseRejectCallback (Shelley Vohr) #34387
* (SEMVER-MINOR) allow setting a dir for all diagnostic output (AshCripps) #33584
worker:
* (SEMVER-MINOR) make MessagePort inherit from EventTarget (Anna Henningsen) #34057
zlib:
* switch to lazy init for zlib streams (Andrey Pechkurov) #34048
PR-URL: #34542
ruyadorno added a commit that referenced this pull request Jul 29, 2020
Notable changes:
deps:
* upgrade npm to 6.14.7 (claudiahdz) #34468
dgram:
* (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
doc:
* add AshCripps to collaborators (AshCripps) #34494
* add HarshithaKP to collaborators (Harshitha K P) #34417
* add rexagod to collaborators (Pranshu Srivastava) #34457
* add release key for Richard Lau (Richard Lau) #34397
events:
* (SEMVER-MINOR) expand NodeEventTarget functionality (Anna Henningsen) #34057
src:
* (SEMVER-MINOR) allow preventing SetPromiseRejectCallback (Shelley Vohr) #34387
* (SEMVER-MINOR) allow setting a dir for all diagnostic output (AshCripps) #33584
worker:
* (SEMVER-MINOR) make MessagePort inherit from EventTarget (Anna Henningsen) #34057
zlib:
* switch to lazy init for zlib streams (Andrey Pechkurov) #34048
PR-URL: #34542
MylesBorins pushed a commit that referenced this pull request Jul 29, 2020
Notable changes:
deps:
* upgrade npm to 6.14.7 (claudiahdz) #34468
dgram:
* (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
doc:
* add AshCripps to collaborators (AshCripps) #34494
* add HarshithaKP to collaborators (Harshitha K P) #34417
* add rexagod to collaborators (Pranshu Srivastava) #34457
* add release key for Richard Lau (Richard Lau) #34397
events:
* (SEMVER-MINOR) expand NodeEventTarget functionality (Anna Henningsen) #34057
src:
* (SEMVER-MINOR) allow preventing SetPromiseRejectCallback (Shelley Vohr) #34387
* (SEMVER-MINOR) allow setting a dir for all diagnostic output (AshCripps) #33584
worker:
* (SEMVER-MINOR) make MessagePort inherit from EventTarget (Anna Henningsen) #34057
zlib:
* switch to lazy init for zlib streams (Andrey Pechkurov) #34048
PR-URL: #34542
addaleax pushed a commit that referenced this pull request Sep 22, 2020
Add a flag that allows for the setting of a directory where all
diagnostic output will be written to.
e.g. --redirect-warnings
Refs: #33010 (comment)
PR-URL: #33584
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@codebyterecodebytere mentioned this pull request Sep 28, 2020
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.c++Issues and PRs that require attention from people who are familiar with C++.cliIssues and PRs related to the Node.js command line interface.semver-minorPRs that contain new features and should be released in the next minor version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@AshCripps@richardlau@nodejs-github-bot@addaleax@sam-github@jasnell@joyeecheung@BethGriggs