midi: add device creation debug logs

osc/midi: add DEBUG prefix to debug logs
This commit is contained in:
bordun 2020-05-08 11:06:51 +02:00
parent 1f3e01cf0e
commit c5e9cb9ce9
4 changed files with 17 additions and 8 deletions

View file

@ -63,7 +63,7 @@ module.exports = {
},
'm': {alias: 'midi', type: 'array', describe: 'midi router settings',
check: (o)=>{
var err = o.filter(item=>!item.match(/^(list|jack|sysex|pc_offset|path=(.*)|[^:]+:(virtual|(-1|[0-9]+),(-1|[0-9]+)))$/))
var err = o.filter(item=>!item.match(/^(list|debug|jack|sysex|pc_offset|path=(.*)|[^:]+:(virtual|(-1|[0-9]+),(-1|[0-9]+)))$/))
return err.length ? `Invalid option${err.length > 1 ? 's' : ''}: ${err.join(', ')}` : true
}
},

View file

@ -189,7 +189,7 @@ class OscServer {
}
if (debug) console.log('(OSC) Out: ',{address:data.address, args: data.args}, 'To: ' + data.host + ':' + data.port)
if (debug) console.log('(DEBUG, OSC) Out: ',{address:data.address, args: data.args}, 'To: ' + data.host + ':' + data.port)
}
@ -208,7 +208,7 @@ class OscServer {
ipc.send('receiveOsc', data, clientId)
if (debug) console.log('(OSC) In: ', {address:data.address, args: data.args}, 'From: ' + data.host + ':' + data.port)
if (debug) console.log('(DEBUG, OSC) In: ', {address:data.address, args: data.args}, 'From: ' + data.host + ':' + data.port)
}