conditional debugging

This commit is contained in:
Mark Vayngrib 2015-05-18 10:37:00 -04:00
parent 77596a2a78
commit fc78253ef2

View File

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