 (defmethod handle-action :new-log
   [db {:keys [data]}]
   {:pre [(valid-log? data)]}
-  (let [data (assoc data ::cached-render (render-msg data))]
-    ;; First put it in the global log message vector:
-    (swap! db update-in [:logs] conj data)
-    ;; Then also put it into all tabs :logs vectors
-    (doseq [tab (keys (:tabs @db))]
-      (let [td (apply comp
-                      (search-transducer db tab)
-                      (get-in @db [:tabs tab :transducers]))
-            ;; A hack: Run a transducer on a single element and pick out the elem
-            data-td (single-transduce td data)
-            kork [:tabs tab :logs]]
-        ;; Don't swap if it's empty. Doh
-        (when-not (empty? data-td) 
-          (swap! db update-in kork conj data-td))))))
+  ;; First put it in the global log message vector:
+  (swap! db update-in [:logs] conj data)
+  ;; Then also put it into all tabs :logs vectors
+  (doseq [tab (keys (:tabs @db))]
+    (let [td (apply comp
+                    (search-transducer db tab)
+                    (get-in @db [:tabs tab :transducers]))
+          ;; A hack: Run a transducer on a single element and pick out the elem
+          data-td (single-transduce td data)
+          kork [:tabs tab :logs]]
+      ;; Don't swap if it's empty. Doh
+      (when-not (empty? data-td) 
+        (swap! db update-in kork conj data-td)))))
 
 ;; Invalidades the cached log vector in a certain tab. This is needed when the
 ;; search term is changed or new tab-transduceres were added

  (-> log-ev
      ensure-uuid
      ensure-msg-vec
      ensure-timed))

(defn single-transduce
  "Takes a transducer (xform) and an item and applies the transducer to the

   (contains? log-ev :msg) ;; can be anything (even nil!), but must exist
   ))

(defn cache-render
  [lg-ev]
  (assoc lg-ev ::cached-render (render-msg lg-ev)))

(defn log+rules
  "Adds some data to the log message (such as date and uuid) if it's not already
  there"
