             (fn [ex]
               (assoc this
                      ::log/state (swap! log-state-atom
-                                        #(log/flush-logs! (log/exception %
+                                        #(log/flush-logs! logger
+                                                          (log/exception %
                                                                          ex
                                                                          ::do-polling-loop))))))
         (deref timeout ::polling-timed-out))))

    (-> dfrd-send-success
        (dfrd/timeout!  1000)
        (dfrd/chain
         (fn [send-packet-success]
           (if send-packet-success
             ;; Note that this timeout actually can grow to be quite long.
             ;; In the original, they probably add up to a ballpark of a minute.
             ;; It's probably acceptable for a single polling thread to block for that
             ;; long.
             ;; Or, at least, it probably was back in 2011 when the spec was written,
             ;; or in 2013 when my copy of the reference implementation was published.
             ;; Q: Is that still reasonable today?
             ;; Better Q: Is there a better alternative?
             (dfrd/timeout! cookie-response timeout ::awaiting-cookie-timed-out)
             (trampoline possibly-recurse
                         (assoc this ::log/state @log-state-atom)
                         ips cookie-sent-callback raw-packet)))
         (fn [actual-success]
           (let [now (System/nanoTime)]
             (swap! log-state-atom (fn [local]
                                     (log/merge-state local (::log/state actual-success))))
             (println "hello/do-polling-loop Sent HELLO actual-success:\n"
                      (dissoc actual-success ::log/state)
                      "\nTop-level keys:\n"

                                     raw-packet
                                     cookie-sent-callback
                                     now
                                     (pick-next-timeout timeout)
                                     ips)))))))
        (dfrd/catch ExceptionInfo
