From 6f214a66e8554c6f59674e5eba430a7e3ef3c1b6 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 4 Apr 2022 13:49:30 -0400 Subject: [PATCH] AdultingSession: just create new child logger (simpler) --- lib/utils/place-outdial.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/utils/place-outdial.js b/lib/utils/place-outdial.js index 42aeb130..876a8840 100644 --- a/lib/utils/place-outdial.js +++ b/lib/utils/place-outdial.js @@ -348,7 +348,6 @@ class SingleDialer extends Emitter { } async doAdulting({logger, tasks, application}) { - this.logger = logger; this.adulting = true; this.emit('adulting'); if (this.ep) { @@ -363,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); - logger.bindings({traceId: rootSpan.traceId, callSid: this.callSid, callId: this.dlg.sip.callId}); + this.logger = logger.child({traceId: rootSpan.traceId}); const cs = new AdultingCallSession({ - logger, + logger: this.logger, singleDialer: this, application, callInfo: this.callInfo,