         ;; total-depth, on the other hand, is the depth all the way to the top of the entire
         ;; expression, which might involve several parent lightning bolts.
         parents (shuffle (candidate-parents grammar spec))]
-    (log/debug (str "lightning-bolt: candidate-parents:" (count parents) " for spec:" (strip-refs spec)))
+    (log/debug (str "lightning-bolt: candidate-parents: [" (string/join "," (map :rule parents)) "] for spec:" (strip-refs spec)))
     (let [lexical ;; 1. generate list of all phrases where the head child of each parent is a lexeme.
           (when (= false (get-in spec [:head :phrasal] false))
             (mapfn (fn [parent]

                                   truncate-children max-total-depth))
       (do (log-bolt-groups bolt-groups language-model)
           (reduce concat bolt-groups))))))

(defn log-bolt-groups [bolt-groups language-model]
  (log/trace
   (str "bolt-groups:\n"
        (string/join "\n"
                     (map (fn [bolt-group]
                            (str "bolt-group:\n"
                                 (string/join "\n"
                                              (map (fn [bolt]
                                                     (str " " (show-bolt bolt language-model)))
                                                   bolt-group))))
                          bolt-groups)))))

;; TODO: make this non-recursive by using mapcat.
(defn add-all-comps-with-paths [bolts language-model total-depth comp-paths truncate-children max-total-depth]

      {:subcat/:1/:cat subcat1
       :subcat/:1/:agr (get-in spec [:synsem :subcat :1 :agr])}))))

(defn log-bolt-groups [bolt-groups language-model]
  (log/trace
   (str "bolt-groups:\n"
        (string/join "\n"
                     (map (fn [bolt-group]
                            (str "bolt-group:\n"
                                 (string/join "\n"
                                              (map (fn [bolt]
                                                     (str " " (show-bolt bolt language-model)))
                                                   bolt-group))))
                          bolt-groups)))))
