     (jdbc/with-transacted-connection' db :repeatable-read
       (scf-storage/maybe-activate-node! certname producer-timestamp)
       (scf-storage/replace-facts! fact-data))
-    (log/info (trs "[{0}-{1}] [{2} ms] ''{3}'' command processed for {4}"
-                   (str id)
-                   (str (tcoerce/to-long received))
-                   (in-millis (interval start-time (now)))
-                   (command-names :replace-facts)
-                   certname))))
+    (log-command-processed-messsage id received start-time :replace-facts certname)))
 
 (defn replace-facts [{:keys [payload version received] :as command} start-time db]
   (replace-facts* (upon-error-throw-fatality

      (when-not (scf-storage/certname-exists? certname)
        (scf-storage/add-certname! certname))
      (scf-storage/deactivate-node! certname producer-timestamp))
    (log/info (trs "[{0}-{1}] [{2} ms] ''{3}'' command processed for {4}"
                   (str id)
                   (str (tcoerce/to-long received))
                   (in-millis (interval start-time (now)))
                   (command-names :deactivate-node)
                   certname))))

(defn deactivate-node [{:keys [payload version] :as command} start-time db]
  (-> command

    (jdbc/with-transacted-connection' db :repeatable-read
      (scf-storage/maybe-activate-node! certname producer-timestamp)
      (scf-storage/replace-catalog! catalog received))
    (log-command-processed-messsage id received start-time :replace-catalog certname)))

(defn replace-catalog [{:keys [payload received version] :as command} start-time db]
  (let [validated-payload (upon-error-throw-fatality
