Liking cljdoc? Tell your friends :D

lambdaisland.log4j2

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 
raw docstring

debugcljmacro

(debug & kvs)

Logs a debug message with key-value pairs.

Logs a debug message with key-value pairs.
sourceraw docstring

errorcljmacro

(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.
sourceraw docstring

fatalcljmacro

(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.
sourceraw docstring

infocljmacro

(info & kvs)

Logs an info message with key-value pairs.

Logs an info message with key-value pairs.
sourceraw docstring

log*clj

(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.
sourceraw docstring

tracecljmacro

(trace & kvs)

Logs a trace message with key-value pairs.

Logs a trace message with key-value pairs.
sourceraw docstring

warncljmacro

(warn & kvs)

Logs a warn message with key-value pairs.

Logs a warn message with key-value pairs.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close