Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*! @license MIT ©2013-2016 Miel Vander Sande, Ghent University - imec */
var Logger = require('./Logger'),
util = require('util'),
AsyncIterator = require('asynciterator');
var iteratorId = 0, logId = 0;
AsyncIterator.prototype._uniqueId = function () {
if (!this.__uniqueid)
this.__uniqueid = ++iteratorId;
return this.__uniqueid;
};
function ExecutionLogger(name) {
if (!(this instanceof ExecutionLogger))
return new ExecutionLogger(name);
Logger.call(this, name);
}
util.inherits(ExecutionLogger, Logger);
ExecutionLogger.prototype.logBinding = function (iterator, bindings, triplePattern, count) {
if (Logger.enabled('debug'))
this.debug(++logId, iterator._uniqueId(), bindings, triplePattern, count);
};