minor logging improvement

This commit is contained in:
Dave Horton
2022-04-04 14:02:09 -04:00
parent 6f214a66e8
commit 49a75a3e3a

View File

@@ -362,9 +362,9 @@ class SingleDialer extends Emitter {
this.dlg.callSid = this.callSid;
this.dlg.linkedSpanId = this.rootSpan.traceId;
const rootSpan = new RootSpan('outbound-call', this.dlg);
this.logger = logger.child({traceId: rootSpan.traceId});
const newLogger = logger.child({traceId: rootSpan.traceId});
const cs = new AdultingCallSession({
logger: this.logger,
logger: newLogger,
singleDialer: this,
application,
callInfo: this.callInfo,
@@ -372,7 +372,7 @@ class SingleDialer extends Emitter {
tasks,
rootSpan
});
cs.exec();
cs.exec().catch((err) => newLogger.error({err}, 'doAdulting: error executing session'));
return cs;
}