conditional debugging

This commit is contained in:
Mark Vayngrib 2015-05-18 10:37:00 -04:00
parent 77596a2a78
commit fc78253ef2
1 changed files with 5 additions and 3 deletions

View File

@ -47,10 +47,12 @@ inherits(UdpSocket, EventEmitter)
UdpSocket.prototype._debug = function() {
// for now
if (typeof DEBUG !== 'undefined' && DEBUG) {
var args = [].slice.call(arguments)
args.unshift('socket-' + this._id)
console.log.apply(console, args)
}
}
UdpSocket.prototype.bind = function(port, address, callback) {
var self = this