Liking cljdoc? Tell your friends :D

clojure.tools.logging.readable

Logging macros that support printing message (some) arguments as if wrapped in pr-str, the goal being to preserve their data representation distinct from the explanatory text. See logp and logf for details regarding which args are treated in this manner.

Examples:

(require '[clojure.tools.logging :as log] '[clojure.tools.logging.readable :as logr])

(def x "bar") ; Logged as... (log/debug "foo" x "baz") ; foo bar baz (logr/debug "foo" x "baz") ; foo "bar" baz (log/debugf "foo %s %s" x "baz") ; foo bar baz (logr/debugf "foo %s %s" x "baz") ; foo "bar" "baz"

Logging macros that support printing message (some) arguments as
if wrapped in pr-str, the goal being to preserve their data representation
distinct from the explanatory text. See logp and logf for details regarding
which args are treated in this manner.

Examples:

(require '[clojure.tools.logging :as log]
         '[clojure.tools.logging.readable :as logr])

(def x "bar")
                                  ; Logged as...
(log/debug "foo" x "baz")         ; foo bar baz
(logr/debug "foo" x "baz")        ; foo "bar" baz
(log/debugf "foo %s %s" x "baz")  ; foo bar baz
(logr/debugf "foo %s %s" x "baz") ; foo "bar" "baz"
raw docstring

debugcljmacro

(debug message & more)
(debug throwable message & more)

Debug level logging using print-style args. See logp for details.

Debug level logging using print-style args. See logp for details.
raw docstring

debugfcljmacro

(debugf fmt & fmt-args)
(debugf throwable fmt & fmt-args)

Debug level logging using format. See logf for details.

Debug level logging using format. See logf for details.
raw docstring

errorcljmacro

(error message & more)
(error throwable message & more)

Error level logging using print-style args. See logp for details.

Error level logging using print-style args. See logp for details.
raw docstring

errorfcljmacro

(errorf fmt & fmt-args)
(errorf throwable fmt & fmt-args)

Error level logging using format. See logf for details.

Error level logging using format. See logf for details.
raw docstring

fatalcljmacro

(fatal message & more)
(fatal throwable message & more)

Fatal level logging using print-style args. See logp for details.

Fatal level logging using print-style args. See logp for details.
raw docstring

fatalfcljmacro

(fatalf fmt & fmt-args)
(fatalf throwable fmt & fmt-args)

Fatal level logging using format. See logf for details.

Fatal level logging using format. See logf for details.
raw docstring

infocljmacro

(info message & more)
(info throwable message & more)

Info level logging using print-style args. See logp for details.

Info level logging using print-style args. See logp for details.
raw docstring

infofcljmacro

(infof fmt & fmt-args)
(infof throwable fmt & fmt-args)

Info level logging using format. See logf for details.

Info level logging using format. See logf for details.
raw docstring

logfcljmacro

(logf level fmt & fmt-args)
(logf level throwable fmt & fmt-args)

Logs a message using a format string and args, where all format args will be printed readably, as if wrapped in pr-str. Can optionally take a throwable as its second arg. See level-specific macros, e.g., debugf.

Logs a message using a format string and args, where all format args will be
printed readably, as if wrapped in pr-str. Can optionally take a throwable as
its second arg. See level-specific macros, e.g., debugf.
raw docstring

logpcljmacro

(logp level message & more)
(logp level throwable message & more)

Logs a message using print style args, where message args that are not literal strings will be printed readably, as if wrapped in pr-str. Can optionally take a throwable as its second arg. See level-specific macros, e.g., debug.

Logs a message using print style args, where message args that are not
literal strings will be printed readably, as if wrapped in pr-str. Can
optionally take a throwable as its second arg. See level-specific macros,
e.g., debug.
raw docstring

spyfcljmacro

(spyf fmt expr)
(spyf level fmt expr)

Evaluates expr and may write (logf level fmt result) to the log. Returns the result of expr. Defaults to :debug log level.

Evaluates expr and may write (logf level fmt result) to the log. Returns the
result of expr. Defaults to :debug log level.
raw docstring

tracecljmacro

(trace message & more)
(trace throwable message & more)

Trace level logging using print-style args. See logp for details.

Trace level logging using print-style args. See logp for details.
raw docstring

tracefcljmacro

(tracef fmt & fmt-args)
(tracef throwable fmt & fmt-args)

Trace level logging using format. See logf for details.

Trace level logging using format. See logf for details.
raw docstring

warncljmacro

(warn message & more)
(warn throwable message & more)

Warn level logging using print-style args. See logp for details.

Warn level logging using print-style args. See logp for details.
raw docstring

warnfcljmacro

(warnf fmt & fmt-args)
(warnf throwable fmt & fmt-args)

Warn level logging using format. See logf for details.

Warn level logging using format. See logf for details.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close