(maplog logger-level ctx-map create-message)
(maplog logger-level throwable ctx-map create-message)
Logs an event with ctx-map as an slf4j event Marker. The logger-level parameter may be either a log level keyword like :error or a vector of a custom logger and the log level, like [:sync :error]. Calls (create-message ctx-map) to generate the log message string.
Examples:
(maplog :info {:status 200} #(str "Received success status " (:status %))
(maplog [:sync :warn] {:remote ..., :response ...} #(format "Failed to pull record from remote %s. Response: status %s" (:remote %) (:status %)))
(maplog [:sync :info] {:remote ...} #(format "Finished pull from %s in %s seconds" sync-time (:remote %)))
(maplog :info {:status 200} #(i18n/trs "Received success status {0}" (:status %1)))
Logs an event with ctx-map as an slf4j event Marker. The logger-level parameter may be either a log level keyword like :error or a vector of a custom logger and the log level, like [:sync :error]. Calls (create-message ctx-map) to generate the log message string. Examples: (maplog :info {:status 200} #(str "Received success status " (:status %)) (maplog [:sync :warn] {:remote ..., :response ...} #(format "Failed to pull record from remote %s. Response: status %s" (:remote %) (:status %))) (maplog [:sync :info] {:remote ...} #(format "Finished pull from %s in %s seconds" sync-time (:remote %))) (maplog :info {:status 200} #(i18n/trs "Received success status {0}" (:status %1)))
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close