Skip to content

fix: return path from netLog.stopLogging#21985

Merged
MarshallOfSound merged 1 commit intomasterfrom
netlog-return
Jan 31, 2020
Merged

fix: return path from netLog.stopLogging#21985
MarshallOfSound merged 1 commit intomasterfrom
netlog-return

Conversation

@nornagon
Copy link
Contributor

Description of Change

The docs say we return a string, so let's do that. This was broken by the refactor in #18289.

It's a bit weird that we save the path on behalf of the user—all we're doing is keeping track of the value they passed in. That should really be the responsibility of the user, not the API, but since that's how it's documented to work, we might as well make it work the way the docs say (and the way it used to work).

Checklist

Release Notes

Notes: Fixed netLog.stopLogging returning undefined instead of the path to the log.

@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Jan 31, 2020
const logPath = this._currentlyLoggingPath
this._currentlyLoggingPath = null
return _originalStopLogging.call(this)
return _originalStopLogging.call(this).then(() => logPath)
Copy link
Member

Choose a reason for hiding this comment

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

So simple

@nornagon nornagon added the fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases label Jan 31, 2020
@nornagon
Copy link
Contributor Author

Throwing on [fast-track] to try to get this in before the 8.0.0 stable

@electron-cation electron-cation bot removed the new-pr 🌱 PR opened recently label Jan 31, 2020
Copy link
Member

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

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

LGTM

@MarshallOfSound MarshallOfSound merged commit 1c6d8f5 into master Jan 31, 2020
@release-clerk
Copy link

release-clerk bot commented Jan 31, 2020

Release Notes Persisted

Fixed netLog.stopLogging returning undefined instead of the path to the log.

@trop
Copy link
Contributor

trop bot commented Jan 31, 2020

I have automatically backported this PR to "7-1-x", please check out #21988

@trop trop bot removed the target/7-1-x label Jan 31, 2020
@trop
Copy link
Contributor

trop bot commented Jan 31, 2020

I have automatically backported this PR to "8-x-y", please check out #21989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants