Allow custom log function. Not only console

This commit is contained in:
GermanBluefox 2016-08-25 22:02:57 +02:00 committed by GitHub
parent 2451fafa25
commit b3bb80a480
1 changed files with 2 additions and 1 deletions

View File

@ -1,6 +1,6 @@
'use strict';
function log(debug) {
function _log(debug) {
if (debug) {
var args = Array.prototype.slice.call(arguments);
args.shift();
@ -13,6 +13,7 @@ module.exports.create = function (le) {
var PromiseA = require('bluebird');
var utils = require('./utils');
var RSA = PromiseA.promisifyAll(require('rsa-compat').RSA);
var log = le.log || _log; // allow custom log
var core = {
//