Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ class Daemon {
}

const daemon = execa(this._binPath, execOptions)
if (process.env.DEBUG) {
daemon.stderr.pipe(process.stderr)
Copy link
Member

Choose a reason for hiding this comment

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

Aren't library logs suppose to be in process.stdout?

Might be useful to pass custom env to execa, I think something like execa(this._binPath, execOptions, {env: {DEBUG: "libp2p:noise, libp2p:secio"}}) should be supported

Copy link
Contributor Author

Choose a reason for hiding this comment

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

All debug logs are going to stderr as we're just using the defaults in the debug module atm.

execa forwards env to the new process, so it shouldn't be necessary as we only need forwarding right now. We don't need the conditional though.

}

daemon.stdout.once('data', () => {
resolve()
Expand Down