Provides a structured, key-value logging interface on top of Log4j2. Inspired by pedestal.log and lambdaisland.glogi.
Usage: (require '[lambdaisland.log4j2 :as log])
(log/info :app/starting {:port 8080 :env :prod}) (try (/ 1 0) (catch Exception e (log/error :db/query-failed {:query "SELECT * FROM users"} :exception e)))
Built to work with structured output, in particular JsonLayout
Provides a structured, key-value logging interface on top of Log4j2.
Inspired by pedestal.log and lambdaisland.glogi.
Usage:
(require '[lambdaisland.log4j2 :as log])
(log/info :app/starting {:port 8080 :env :prod})
(try
(/ 1 0)
(catch Exception e
(log/error :db/query-failed {:query "SELECT * FROM users"} :exception e)))
Built to work with structured output, in particular JsonLayout cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |