From 49a75a3e3a6a02ecfe4ed1be7e987de26c831af2 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 4 Apr 2022 14:02:09 -0400 Subject: [PATCH] minor logging improvement --- lib/utils/place-outdial.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/utils/place-outdial.js b/lib/utils/place-outdial.js index 876a8840..3b7a6fc3 100644 --- a/lib/utils/place-outdial.js +++ b/lib/utils/place-outdial.js @@ -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; }