Skip to content

Log IPC messages with verbose: 'full' #1063

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

Merged
merged 1 commit into from
May 17, 2024
Merged

Log IPC messages with verbose: 'full' #1063

merged 1 commit into from
May 17, 2024

Conversation

ehmicky
Copy link
Collaborator

@ehmicky ehmicky commented May 16, 2024

Currently, when the verbose option is 'full', the subprocess' stdout/stderr is logged.

With this PR, IPC messages are logged as well, providing both the ipc option is true and the verbose option is 'full'.

This should help users debug IPC-related bugs.

$ node build.js
[20:36:11.043] [0] $ npm run build
[20:36:11.200] [0]   Running build...
[20:36:11.300] [0] * First IPC message, as a string
[20:36:11.300] [0] * {message: 'Second IPC message, as an object'}
[20:36:11.400] [0]   More output...
[20:36:11.885] [0] ✔ (done in 842ms)

Also, currently, users can choose what to log. For example, to log stderr but not stdout: execa(..., {verbose: {stdout: 'none', stderr: 'full'}). This PR extends this syntax to IPC as well. For example, to log stdout/stderr but not IPC: execa(..., {verbose: {stdout: 'full', stderr: 'full', ipc: 'none'}).

@sindresorhus sindresorhus merged commit 839c2fe into main May 17, 2024
14 checks passed
@sindresorhus sindresorhus deleted the verbose-ipc branch May 17, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants