mirror of
https://github.com/taoensso/telemere.git
synced 2025-12-18 18:11:12 +00:00
[doc] Misc improvements
This commit is contained in:
parent
e60dde03eb
commit
e1dcdc8257
2 changed files with 8 additions and 8 deletions
|
|
@ -154,17 +154,17 @@ It enables you to write code that is **information-verbose by default**.
|
||||||
;; See current handlers
|
;; See current handlers
|
||||||
(t/get-handlers) ; => {<handler-id> {:keys [handler-fn handler-stats_ dispatch-opts]}}
|
(t/get-handlers) ; => {<handler-id> {:keys [handler-fn handler-stats_ dispatch-opts]}}
|
||||||
|
|
||||||
;; Add built-in console handler to print human-readable output
|
;; Add console handler to print signals as human-readable text
|
||||||
(t/add-handler! :my-handler
|
(t/add-handler! :my-handler
|
||||||
(t/handler:console
|
(t/handler:console
|
||||||
{:output-fn (t/format-signal-fn {})}))
|
{:output-fn (t/format-signal-fn {})}))
|
||||||
|
|
||||||
;; Add built-in console handler to print edn output
|
;; Add console handler to print signals as edn
|
||||||
(t/add-handler! :my-handler
|
(t/add-handler! :my-handler
|
||||||
(t/handler:console
|
(t/handler:console
|
||||||
{:output-fn (t/pr-signal-fn {:pr-fn :edn})}))
|
{:output-fn (t/pr-signal-fn {:pr-fn :edn})}))
|
||||||
|
|
||||||
;; Add built-in console handler to print JSON output
|
;; Add console handler to print signals as JSON
|
||||||
;; Ref. <https://github.com/metosin/jsonista> (or any alt JSON lib)
|
;; Ref. <https://github.com/metosin/jsonista> (or any alt JSON lib)
|
||||||
#?(:clj (require '[jsonista.core :as jsonista]))
|
#?(:clj (require '[jsonista.core :as jsonista]))
|
||||||
(t/add-handler! :my-handler
|
(t/add-handler! :my-handler
|
||||||
|
|
@ -338,7 +338,7 @@ Licensed under [EPL 1.0](LICENSE.txt) (same as Clojure).
|
||||||
<!-- Project -->
|
<!-- Project -->
|
||||||
|
|
||||||
[Codox docs]: https://taoensso.github.io/telemere/
|
[Codox docs]: https://taoensso.github.io/telemere/
|
||||||
[cljdoc docs]: https://cljdoc.org/d/com.taoensso/telemere/
|
[cljdoc docs]: https://cljdoc.org/d/com.taoensso/telemere/CURRENT/api/taoensso.telemere
|
||||||
|
|
||||||
[Clojars SVG]: https://img.shields.io/clojars/v/com.taoensso/telemere.svg
|
[Clojars SVG]: https://img.shields.io/clojars/v/com.taoensso/telemere.svg
|
||||||
[Clojars URL]: https://clojars.org/com.taoensso/telemere
|
[Clojars URL]: https://clojars.org/com.taoensso/telemere
|
||||||
|
|
|
||||||
|
|
@ -100,17 +100,17 @@
|
||||||
;; See current handlers
|
;; See current handlers
|
||||||
(t/get-handlers) ; => {<handler-id> {:keys [handler-fn handler-stats_ dispatch-opts]}}
|
(t/get-handlers) ; => {<handler-id> {:keys [handler-fn handler-stats_ dispatch-opts]}}
|
||||||
|
|
||||||
;; Add built-in console handler to print human-readable output
|
;; Add console handler to print signals as human-readable text
|
||||||
(t/add-handler! :my-handler
|
(t/add-handler! :my-handler
|
||||||
(t/handler:console
|
(t/handler:console
|
||||||
{:output-fn (t/format-signal-fn {})}))
|
{:output-fn (t/format-signal-fn {})}))
|
||||||
|
|
||||||
;; Add built-in console handler to print edn output
|
;; Add console handler to print signals as edn
|
||||||
(t/add-handler! :my-handler
|
(t/add-handler! :my-handler
|
||||||
(t/handler:console
|
(t/handler:console
|
||||||
{:output-fn (t/pr-signal-fn {:pr-fn :edn})}))
|
{:output-fn (t/pr-signal-fn {:pr-fn :edn})}))
|
||||||
|
|
||||||
;; Add built-in console handler to print JSON output
|
;; Add console handler to print signals as JSON
|
||||||
;; Ref. <https://github.com/metosin/jsonista> (or any alt JSON lib)
|
;; Ref. <https://github.com/metosin/jsonista> (or any alt JSON lib)
|
||||||
#?(:clj (require '[jsonista.core :as jsonista]))
|
#?(:clj (require '[jsonista.core :as jsonista]))
|
||||||
(t/add-handler! :my-handler
|
(t/add-handler! :my-handler
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue