         (println
          (str
           "\nDetected unusual method call: "
-          (class class-name)
+          (.getName (class class-name))
           " was called with arguments \n\t"
           (format-signature current-call-types)
           "\nprevious calls were with\n\t"
-          (join-with-newline (map format-signature previous-call-types))
-          "\nStacktrace:\n")
-         (stacktrace/format-stack-trace (.getStackTrace (Thread/currentThread)))))
+          (join-with-newline (map format-signature previous-call-types))))
+        (when *print-stacktraces*
+          (println "\nStacktrace:\n"
+                   (stacktrace/format-stack-trace (.getStackTrace (Thread/currentThread))))))
 
       (swap! method-calls
              update-in

(ns introspect.core
  (:import [introspect IntrospectProfilingAgent Interceptor])
  (:require [introspect.stacktrace :as stacktrace]))

(def format-signature #(str "(" (clojure.string/join " -> " %) ")"))
(def join-with-newline #(clojure.string/join "\n\t" %))

(defn get-type



;; (def method-calls (atom {}))

(def ^:dynamic *print-stacktraces* false)

(let [method-calls (atom {})]

