Makes logging unified
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
[clj-time.coerce :as coerce]
|
||||
[clj-time.core :as t]
|
||||
[clojure.data.csv :as csv]
|
||||
[clojure.tools.logging :as log]
|
||||
[com.brunobonacci.mulog :as mu]
|
||||
[datomic.api :as dc]
|
||||
[iol-ion.tx :refer [random-tempid]])
|
||||
@@ -180,7 +179,7 @@
|
||||
(map (fn [client-id]
|
||||
[client-id (build-account-lookup client-id)]))
|
||||
(into {}))]
|
||||
(log/info "Running balance sheet with " args)
|
||||
(alog/info ::balance-sheet :params args)
|
||||
|
||||
(cond-> {:balance-sheet-accounts (mapcat
|
||||
#(roll-up-until (lookup-account %) (all-ledger-entries %) end-date )
|
||||
@@ -357,7 +356,7 @@
|
||||
(if (> (count all-ids) 1000)
|
||||
{:message (str "You can only delete 1000 ledger entries at a time.")}
|
||||
(do
|
||||
(log/info "Deleting " (count all-ids) args)
|
||||
(alog/info ::deleting :args args)
|
||||
(audit-transact-batch
|
||||
(map (fn [i]
|
||||
[:db/retractEntity i])
|
||||
@@ -547,8 +546,9 @@
|
||||
)
|
||||
(map first)
|
||||
(map (fn [je] [:db/retractEntity je])))]
|
||||
(log/info "manual ledger import has " (count success) " new rows")
|
||||
(log/info errors)
|
||||
(alog/info ::manual-import
|
||||
:errors (count errors)
|
||||
:sample (take 3 errors))
|
||||
|
||||
|
||||
(mu/trace ::retraction-tx
|
||||
@@ -558,7 +558,6 @@
|
||||
[:count (count ignore-retraction)]
|
||||
(when (seq ignore-retraction)
|
||||
(audit-transact-batch ignore-retraction (:id context))))
|
||||
#_(log/info (map :tx success))
|
||||
(let [invalidated
|
||||
(mu/trace ::success-tx
|
||||
[:count (count success)]
|
||||
|
||||
Reference in New Issue
Block a user