Makes logging unified
This commit is contained in:
@@ -22,27 +22,33 @@
|
||||
[datomic.api :as dc]
|
||||
[mount.core :as mount]
|
||||
[nrepl.middleware.print]
|
||||
[unilog.context :as lc]
|
||||
[com.brunobonacci.mulog :as mu]
|
||||
[com.brunobonacci.mulog.buffer :as rb]
|
||||
[datomic.api :as d]
|
||||
[puget.printer :as puget]
|
||||
[clojure.data.json :as json]
|
||||
[auto-ap.solr :as solr])
|
||||
(:import
|
||||
(org.apache.commons.io.input BOMInputStream)))
|
||||
|
||||
(defn println-event [item]
|
||||
(printf "%s: %s - %s:%s %s\n"
|
||||
(printf "%s: %s - %s:%s by %s\n"
|
||||
(str (c/to-date-time (:mulog/timestamp item)))
|
||||
(:mulog/namespace item) (:mulog/event-name item)
|
||||
(if (:mulog/duration item)
|
||||
(str " " (int (/ (:mulog/duration item) 1000000)) "ms")
|
||||
"")
|
||||
(pr-str (reduce
|
||||
(fn [acc [k v]]
|
||||
(assoc acc k v))
|
||||
{}
|
||||
item))))
|
||||
(:user-name item)
|
||||
)
|
||||
(puget/cprint (reduce
|
||||
(fn [acc [k v]]
|
||||
(assoc acc k v))
|
||||
{}
|
||||
(dissoc
|
||||
item
|
||||
:user))
|
||||
{:seq-limit 10})
|
||||
(println))
|
||||
|
||||
|
||||
(deftype DevPublisher [config buffer transform]
|
||||
|
||||
Reference in New Issue
Block a user