stacktraces: `clj-stacktrace`->`io.aviso.exception` for stacktrace printing

This commit is contained in:
Peter Taoussanis 2013-11-29 13:26:45 +07:00
parent fb1cc1620b
commit c094f299a5
3 changed files with 5 additions and 6 deletions

View File

@ -5,7 +5,7 @@
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.4.0"]
[org.clojure/tools.macro "0.1.5"]
[clj-stacktrace "0.2.7"]]
[io.aviso/pretty "0.1.6"]]
:profiles {:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}
:1.5 {:dependencies [[org.clojure/clojure "1.5.1"]]}
:1.6 {:dependencies [[org.clojure/clojure "1.6.0-alpha2"]]}

View File

@ -1,7 +1,7 @@
(ns taoensso.timbre "Simple, flexible, all-Clojure logging. No XML!"
{:author "Peter Taoussanis"}
(:require [clojure.string :as str]
[clj-stacktrace.repl :as stacktrace]
[io.aviso.exception :as aviso-ex]
[taoensso.timbre.utils :as utils])
(:import [java.util Date Locale]
[java.text SimpleDateFormat]))
@ -36,10 +36,10 @@
(defmacro with-err-as-out "Evaluates body with *err* bound to *out*."
[& body] `(binding [*err* *out*] ~@body))
(defn stacktrace [throwable & [separator]]
(defn stacktrace "Default stacktrace formatter for use by appenders, etc."
[throwable & [separator]]
(when throwable
(str separator throwable ; (str throwable) incl. ex-data for Clojure 1.4+
"\n\n" (stacktrace/pst-str throwable))))
(str separator (aviso-ex/format-exception throwable))))
;;;; Default configuration and appenders

View File

@ -2,7 +2,6 @@
(:import
[java.io File FilenameFilter])
(:require
[clj-stacktrace.repl :as stacktrace]
[clojure.java.io :as io]
[taoensso.timbre :as t]))