electron/lib/browser/api/net-log.js

17 lines
366 B
JavaScript
Raw Normal View History

'use strict'
2018-09-13 16:10:51 +00:00
const { netLog, NetLog } = process.atomBinding('net_log')
NetLog.prototype.stopLogging = function (callback) {
if (callback && typeof callback !== 'function') {
throw new Error('Invalid callback function')
}
const path = this.currentlyLoggingPath
this._stopLogging(() => {
if (callback) callback(path)
})
}
module.exports = netLog