attempting for square 3 approach.
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
[clj-http.client :as http]
|
||||
[clojure.tools.logging :as log]
|
||||
[config.core :refer [env]]
|
||||
[unilog.context :as lc]))
|
||||
[unilog.context :as lc]
|
||||
[com.brunobonacci.mulog :as mu]))
|
||||
|
||||
(defn get-container-data []
|
||||
(try
|
||||
@@ -34,7 +35,10 @@
|
||||
(defn set-logging-context []
|
||||
(when (seq container-data)
|
||||
(lc/push-context "container" (:DockerId container-data))
|
||||
(lc/push-context "ip" (-> container-data :Networks first :IPv4Addresses first))))
|
||||
(lc/push-context "ip" (-> container-data :Networks first :IPv4Addresses first))
|
||||
(mu/set-global-context!
|
||||
{:container (:DockerId container-data)
|
||||
:ip (-> container-data :Networks first :IPv4Addresses first)})))
|
||||
|
||||
(defn stop-logging-context []
|
||||
(when (seq container-data)
|
||||
|
||||
Reference in New Issue
Block a user