Cloud-Automation / node-modbus

Modbus TCP Client/Server implementation for Node.JS
471 stars 175 forks source link

jsmodbus client always has result output to console. #24

Closed NNM11 closed 8 years ago

NNM11 commented 8 years ago

SUGGESTION: The jsmodbus client reading always has the result output to console. This needs to be suppressed as log() as applications would produce theirs own outputs.

This code should be change to log() instead of console.log().

// SerialClient.js  - #255 - replace console.log() with log()
proto.promiseCallback = function (defer) {

    var that = this;

    return function (resp, err) {

        log(JSON.stringify(argument));  // console.log(arguments);

        if (err) {

            defer.reject(err);
            return;

        }

        defer.resolve(resp);

    };

};
stefanpoeter commented 8 years ago

Thanks @NNM11, forgot that.