mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
minor logging changes
This commit is contained in:
@@ -138,7 +138,7 @@ class WsRequestor extends BaseRequestor {
|
|||||||
success: (response) => {
|
success: (response) => {
|
||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
const rtt = this._roundTrip(startAt);
|
const rtt = this._roundTrip(startAt);
|
||||||
this.logger.info({response}, `WsRequestor:request ${url} succeeded in ${rtt}ms`);
|
this.logger.debug({response}, `WsRequestor:request ${url} succeeded in ${rtt}ms`);
|
||||||
this.stats.histogram('app.hook.ws_response_time', rtt, ['hook_type:app']);
|
this.stats.histogram('app.hook.ws_response_time', rtt, ['hook_type:app']);
|
||||||
resolve(response);
|
resolve(response);
|
||||||
},
|
},
|
||||||
@@ -286,7 +286,7 @@ class WsRequestor extends BaseRequestor {
|
|||||||
const obj = JSON.parse(content);
|
const obj = JSON.parse(content);
|
||||||
const {type, msgid, command, call_sid = this.call_sid, queueCommand = false, data} = obj;
|
const {type, msgid, command, call_sid = this.call_sid, queueCommand = false, data} = obj;
|
||||||
|
|
||||||
this.logger.debug({obj}, 'WsRequestor:request websocket: received');
|
//this.logger.debug({obj}, 'WsRequestor:request websocket: received');
|
||||||
assert.ok(type, 'type property not supplied');
|
assert.ok(type, 'type property not supplied');
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@@ -323,7 +323,7 @@ class WsRequestor extends BaseRequestor {
|
|||||||
|
|
||||||
_recvCommand(msgid, command, call_sid, queueCommand, data) {
|
_recvCommand(msgid, command, call_sid, queueCommand, data) {
|
||||||
// TODO: validate command
|
// TODO: validate command
|
||||||
this.logger.info({msgid, command, call_sid, queueCommand, data}, 'received command');
|
this.logger.debug({msgid, command, call_sid, queueCommand, data}, 'received command');
|
||||||
this.emit('command', {msgid, command, call_sid, queueCommand, data});
|
this.emit('command', {msgid, command, call_sid, queueCommand, data});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user