Whether or not to print the trace in color. True by default, unless the env var NO_COLOR
is true.
Whether or not to print the trace in color. True by default, unless the env var `NO_COLOR` is true.
Pretty-printer function to use for pretty printing forms in the trace. You can bind this to override the default pretty-printing functions (see below).
Pretty-printer function to use for pretty printing forms in the trace. You can bind this to override the default pretty-printing functions (see below).
(trace multifn & args)
Instrument a multimethod multifn
, then invoke it; calls to its primary and aux methods and their results are
printed to out. Returns same result as untraced version would have returned. Prints trace in color by default, but you can disable this by binding [[*color*]] to
false`.
Method calls are printed with n:
, where n
is the current depth of the trace; the result of each method call is
printed with a corresponding n>
:
(trace/trace my-fn 1 {}) ;; -> 0: (my-fn 1 {}) 1: (#primary-method<:default> nil 1 {}) 1> {:x 1} 1: (#aux-method<:after [java.lang.Object :default]> 1 {:x 1}) 1> {:object? true, :x 1} 0> {:object? true, :x 1}
Instrument a multimethod `multifn`, then invoke it; calls to its primary and aux methods and their results are printed to *out*`. Returns same result as untraced version would have returned. Prints trace in color by default, but you can disable this by binding [[*color*]] to `false`. Method calls are printed with `n:`, where `n` is the current depth of the trace; the result of each method call is printed with a corresponding `n>`: (trace/trace my-fn 1 {}) ;; -> 0: (my-fn 1 {}) 1: (#primary-method<:default> nil 1 {}) 1> {:x 1} 1: (#aux-method<:after [java.lang.Object :default]> 1 {:x 1}) 1> {:object? true, :x 1} 0> {:object? true, :x 1}
(trace* multifn & args)
Function version of trace
macro. The only difference is this doesn't capture the form of multifn
passed to
trace
, and thus can't usually generate a pretty description for the top-level form.
Function version of `trace` macro. The only difference is this doesn't capture the form of `multifn` passed to `trace`, and thus can't usually generate a pretty description for the top-level form.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close