diff --git a/axe.js b/axe.js index 250f5230..f6dbe52a 100644 --- a/axe.js +++ b/axe.js @@ -42,8 +42,8 @@ tmp = peers[id = 'http://localhost:8765/gun'] = peers[id] || {}; tmp.id = tmp.url = id; tmp.retry = tmp.retry || 0; // BUG: Check 0? - console.log("AXE enabled: Trying to find network via (1) local peer (2) last used peers (3) hard coded peers."); - console.log("Warning: AXE alpha became super slow & laggy, now in testing only mode!"); + Gun.log.once("AXE enabled: Trying to find network via (1) local peer (2) last used peers (3) hard coded peers."); + Gun.log.once("Warning: AXE alpha became super slow & laggy, now in testing only mode!"); var last = JSON.parse((localStorage||'')[(opt.file||'')+'axe/']||null) || {}; Object.keys(last.peers||'').forEach(function(key){ tmp = peers[id = key] = peers[id] || {}; diff --git a/gun.js b/gun.js index 25c26b94..a49f2bda 100644 --- a/gun.js +++ b/gun.js @@ -1766,7 +1766,7 @@ ;(function(){ var u; if(''+u == typeof Gun){ return } - var DEP = function(n){ console.log("Warning! Deprecated internal utility will break in next version:", n) } + var DEP = function(n){ console.warn("Warning! Deprecated internal utility will break in next version:", n) } // Generic javascript utilities. var Type = Gun; //Type.fns = Type.fn = {is: function(fn){ return (!!fn && fn instanceof Function) }} diff --git a/lib/axe.js b/lib/axe.js index 3606bd30..b90993ee 100644 --- a/lib/axe.js +++ b/lib/axe.js @@ -10,7 +10,7 @@ function start(root){ var opt = root.opt, peers = opt.peers; if(false === opt.axe){ return } if((typeof process !== "undefined") && 'false' === ''+(process.env||'').AXE){ return } - console.log("AXE relay enabled!"); + Gun.log.once("AXE relay enabled!"); var axe = root.axe = {}, tmp, id; var mesh = opt.mesh = opt.mesh || Gun.Mesh(root); // DAM! var dup = root.dup; diff --git a/lib/multicast.js b/lib/multicast.js index 5fcb1dd3..63922dd9 100644 --- a/lib/multicast.js +++ b/lib/multicast.js @@ -36,7 +36,7 @@ Gun.on('create', function(root){ socket.send(buf, 0, buf.length, udp.port, udp.address, noop); } - console.log('Multicast on', udp.peer.id); + Gun.log.once('Multicast on', udp.peer.id); return; // below code only needed for when WebSocket connections desired! setInterval(function broadcast(){ port = port || (opt.web && opt.web.address()||{}).port;