API for trace
Full namespace name: clojure.contrib.trace
This file defines simple "tracing" macros to help you see what your
code is doing.
Public Variables and Functions
Current stack depth of traced function calls.
Usage: (deftrace name & definition)
Use in place of defn; traces each call/return of this fn, including
arguments. Nested calls to deftrace'd functions will print a
Usage: (dotrace fns & exprs)
Given a sequence of function identifiers, evaluate the body
expressions in an environment in which the identifiers are bound to
the traced functions. Does not work on inlined functions,
such as clojure.core/+
Usage: (trace value)
(trace name value)
Sends name (optional) and value to the tracer function, then
returns value. May be wrapped around any expression without
affecting the result.
Usage: (trace-fn-call name f args)
Traces a single call to a function f with args. 'name' is the
symbol name of the function.
Returns an indentation string based on *trace-depth*
Usage: (tracer name value)
This function is called by trace. Prints to standard output, but
may be rebound to do anything you like. 'name' is optional.