API for trace - clojure-contrib v1.2 (stable)

by Stuart Sierra, Michel Salim

Usage:
(ns your-namespace
  (:require clojure.contrib.trace))

Overview

This file defines simple "tracing" macros to help you see what your
code is doing.

Public Variables and Functions



*trace-depth*

var

  
Current stack depth of traced function calls.
Source


deftrace

macro
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
tree-like structure.
Source


dotrace

macro
Usage: (dotrace fnames & 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/+
Source


trace

function
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.
Source


trace-fn-call

function
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.
Source


trace-indent

function
Usage: (trace-indent)
Returns an indentation string based on *trace-depth*
Source


tracer

function
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.
Source
Logo & site design by Tom Hickey.
Clojure auto-documentation system by Tom Faulhaber.