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
(debug & kvs)
Logs a debug message with key-value pairs.
Logs a debug message with key-value pairs.
(error & kvs)
Logs an error message with key-value pairs.
Use the :exception
key to pass a Throwable for stack trace logging.
Logs an error message with key-value pairs. Use the `:exception` key to pass a Throwable for stack trace logging.
(fatal & kvs)
Logs a fatal message with key-value pairs.
Use the :exception
key to pass a Throwable for stack trace logging.
Logs a fatal message with key-value pairs. Use the `:exception` key to pass a Throwable for stack trace logging.
(info & kvs)
Logs an info message with key-value pairs.
Logs an info message with key-value pairs.
(log* level ns-str line & kvs)
Internal logging function. Do not use directly. Handles level check, data conversion, and the actual log call.
Internal logging function. Do not use directly. Handles level check, data conversion, and the actual log call.
(trace & kvs)
Logs a trace message with key-value pairs.
Logs a trace message with key-value pairs.
(warn & kvs)
Logs a warn message with key-value pairs.
Logs a warn message with key-value pairs.
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 |