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

17 lines
364 B
JavaScript
Raw Normal View History

'use strict'
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