How to use the infusion.log function in infusion

To help you get started, we’ve selected a few infusion examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github GPII / universal / tests / ProductionConfigTests.js View on Github external
gpii.tests.productionConfigTesting.testGetForDeletion = function (data, request) {
    var expected = request.options.expectedStatusCodes;
    var actual = request.nativeResponse.statusCode;
    jqUnit.assertNotEquals(
        "Deleting record from database using " + request.options.path +
        ", status: " + actual,
        expected.indexOf(actual), -1
    );
    // Mark and store the to-be-deleted record
    if (actual === 201 || actual === 200) {
        request.options.docToRemove = JSON.parse(data);
        request.options.docToRemove._deleted = true;
    }
    fluid.log(request.options.docToRemove);
};
github GPII / universal / gpii / node_modules / userListeners / src / pcsc.js View on Github external
if (Array.isArray(value)) {
                bytes.push.apply(bytes, value);
            } else {
                bytes.push(value);
            }

        }
    });

    var maxResponseLength = apdu.le || 0;

    var data = Buffer.from(bytes);
    var statusCodeLength = 2;
    var successResponse = 0x9000;

    fluid.log("APDU: ", data.toString("hex").replace(/(..)/g, "$1 "), apdu.text || " ");

    // Send it to the card.
    card.transmit(data, maxResponseLength + statusCodeLength, function (err, buf) {
        if (err) {
            promise.reject({
                isError: true,
                message: "Unable to send command to card",
                error: err
            });
        } else {
            fluid.log("Response: ", buf.toString("hex"));
            if (ignoreStatusCode) {
                promise.resolve(buf);
            } else {
                // Status code is the last 2 bytes (and cards are big endian).
                var statusCode;
github GPII / universal / gpii / node_modules / userListeners / src / pcsc.js View on Github external
reader.on("error", function (e) {
        // The device has gone, or is in an unknown state - restart the user listener.
        fluid.log("Card reader error (" + reader.name + "): ", e.message);
        that.failed(e);
    });
};
github GPII / universal / tests / ProductionConfigTests.js View on Github external
gpii.tests.productionConfigTesting.testPurge = function (data, request) {
    fluid.log(JSON.parse(data));
    gpii.tests.productionConfigTesting.testStatusCode(data, request);
};
github GPII / universal / scripts / deleteAndLoadSnapsets.js View on Github external
function (error) {
            fluid.log(error);
            process.exit(1);
        }
    );
github GPII / universal / gpii / node_modules / preferencesServer / src / preferencesServer.js View on Github external
var mapper = function (rawPrefs) {
        var prefs = rawPrefs ? ontologyHandler.rawPrefsToOntology(rawPrefs, view) : undefined;
        fluid.log("Preferences Server, getPreferences(), returning preferences: ", prefs);
        return prefs;
    };
    return fluid.promise.map(rawPrefsPromise, mapper);
github GPII / universal / gpii / node_modules / lifecycleManager / src / UserLogonStateChange.js View on Github external
stopPromise.then(function (response) {
        fluid.log("userLogonStateChange.logoutUser: Lifecycle manager returned: ", response);
        gpii.lifecycleManager.userLogonHandling.updateLogonChangeModel(lifecycleManager, gpiiKey, "logout", false);
        promiseTogo.resolve(response);
    }, function (error) {
        fluid.log(fluid.logLevel.FAIL, "userLogonStateChange.logoutUser: An error occurred when attempting to log out user: ", error);
github GPII / universal / scripts / deleteExpiredAccessTokens.js View on Github external
gpii.accessTokens.filterExpiredAccessTokens = function (responseString, options) {
    if (options.deleteAll) {
        fluid.log("Deleting all access tokens...");
    } else {
        fluid.log("Filtering for expired access tokens...");
    }
    var tokens = JSON.parse(responseString);
    var expiredTokens = [];
    options.totalTokens = 0;
    if (tokens.rows) {
        fluid.each(tokens.rows, function (aRow) {
            var aToken = aRow.value.authorization;
            if (options.deleteAll || Date.now() > Date.parse(aToken.timestampExpires)) {
                aToken._deleted = true;
                expiredTokens.push(aToken);
            }
            options.totalTokens++;
        });
        options.accessTokens = expiredTokens;
    }
    return expiredTokens;
github GPII / universal / gpii / node_modules / flowManager / src / FlowManager.js View on Github external
}, function (error) {
            fluid.log("Resetting on system startup fails with the error: ", error);
            resetErrorEvent.fire(error);
        });
    } else {