Skip to content

Commit b757786

Browse files
committed
[nop] Update Pretty dependency
1 parent f42b9b8 commit b757786

File tree

3 files changed

+18
-25
lines changed

3 files changed

+18
-25
lines changed

project.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
:test-paths ["test" #_"src"]
1111

1212
:dependencies
13-
[[com.taoensso/encore "3.81.0"]
14-
[io.aviso/pretty "1.4.4"]]
13+
[[com.taoensso/encore "3.81.0"]
14+
[org.clj-commons/pretty "2.2.1"]]
1515

1616
:profiles
1717
{;; :default [:base :system :user :provided :dev]

src/taoensso/timbre.cljc

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
[taoensso.encore :as enc :refer [have have?]]
88
[taoensso.timbre.appenders.core :as core-appenders]
99

10-
#?(:clj [io.aviso.exception :as aviso-ex])
11-
#?(:cljs [goog.i18n.DateTimeFormat :as dtf]))
10+
#?(:clj [clj-commons.format.exceptions :as fmt-ex])
11+
#?(:cljs [goog.i18n.DateTimeFormat :as dtf]))
1212

1313
#?(:cljs (:require-macros [taoensso.timbre])))
1414

@@ -489,19 +489,21 @@
489489

490490
#?(:clj
491491
(def ^:private default-stacktrace-fonts
492-
(enc/get-env {:as :edn}
492+
(enc/get-env
493+
{:as :edn
494+
:default clj-commons.format.exceptions/default-fonts}
493495
[:taoensso.timbre.default-stacktrace-fonts<.edn> ; Undocumented
494-
:timbre-defaut-stacktrace-fonts<.edn> ; Legacy
496+
:timbre-defaut-stacktrace-fonts<.edn> ; Legacy
495497
])))
496498

497499
(defn default-output-error-fn
498500
"Default (fn [data]) -> string, used by `default-output-fn` to
499501
generate output for `:?err` value in log data.
500502
501503
For Clj:
502-
Uses `io.aviso/pretty` to return an attractive stacktrace.
504+
Uses `org.clj-commons/pretty` to return an attractive stacktrace.
503505
Options:
504-
:stacktrace-fonts ; See `io.aviso.exception/*fonts*`
506+
:stacktrace-fonts ; See `clj-commons.format.exceptions/*fonts*`
505507
506508
For Cljs:
507509
Returns simple stacktrace string."
@@ -522,18 +524,10 @@
522524
(assoc data :?err c))))))
523525

524526
:clj
525-
(let [stacktrace-fonts ; nil->{}
526-
(if-let [e (find output-opts :stacktrace-fonts)]
527-
(let [st-fonts (val e)]
528-
(if (nil? st-fonts)
529-
{}
530-
st-fonts))
531-
default-stacktrace-fonts)]
532-
533-
(if-let [fonts stacktrace-fonts]
534-
(binding [aviso-ex/*fonts* fonts]
535-
(do (aviso-ex/format-exception err)))
536-
(do (aviso-ex/format-exception err)))))))
527+
(binding [fmt-ex/*fonts*
528+
(get output-opts :stacktrace-fonts
529+
default-stacktrace-fonts)]
530+
(fmt-ex/format-exception err)))))
537531

538532
(comment
539533
(default-output-error-fn

src/taoensso/timbre/appenders/postal.clj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
Requires <https://github.com/drewr/postal>."
44
{:author "Peter Taoussanis (@ptaoussanis)"}
55
(:require
6-
[clojure.string :as str]
7-
[taoensso.encore :as enc :refer [have have?]]
8-
[taoensso.timbre :as timbre]
9-
[io.aviso.exception :as aviso-ex]
10-
[postal.core :as postal]))
6+
[clojure.string :as str]
7+
[taoensso.encore :as enc :refer [have have?]]
8+
[taoensso.timbre :as timbre]
9+
[postal.core :as postal]))
1110

1211
(defn default-subject-fn
1312
"Given an `output-str`, returns an appropriate email subject string:

0 commit comments

Comments
 (0)