feat: allow setting capture mode and max file size in netLog API (#19215)

This commit is contained in:
Jeremy Apthorp 2019-07-25 16:06:39 -07:00 committed by GitHub
parent 8028c57b42
commit 477661d0e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 102 additions and 13 deletions

View file

@ -24,10 +24,10 @@ Session.prototype._init = function () {
}
const _originalStartLogging = NetLog.prototype.startLogging
NetLog.prototype.startLogging = function (path) {
NetLog.prototype.startLogging = function (path, ...args) {
this._currentlyLoggingPath = path
try {
return _originalStartLogging.call(this, path)
return _originalStartLogging.call(this, path, ...args)
} catch (e) {
this._currentlyLoggingPath = null
throw e