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
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