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"
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close