mirror of https://github.com/status-im/timbre.git
[#101] Fix README instructions for cljs ns imports
This commit is contained in:
parent
379bf9d876
commit
fc56b8f86d
22
README.md
22
README.md
|
@ -38,18 +38,22 @@ Add the necessary dependency to your [Leiningen][] `project.clj` and use the sup
|
||||||
```clojure
|
```clojure
|
||||||
[com.taoensso/timbre "4.0.0-beta4"] ; Add to your project.clj :dependencies
|
[com.taoensso/timbre "4.0.0-beta4"] ; Add to your project.clj :dependencies
|
||||||
|
|
||||||
(ns my-app ; Your ns
|
(ns my-clj-ns ; Clj ns => use `:refer`
|
||||||
(:require [taoensso.timbre :as timbre
|
(:require
|
||||||
:refer (log trace debug info warn error fatal report
|
[taoensso.timbre :as timbre
|
||||||
logf tracef debugf infof warnf errorf fatalf reportf
|
:refer (log trace debug info warn error fatal report
|
||||||
spy)]
|
logf tracef debugf infof warnf errorf fatalf reportf spy)]
|
||||||
|
[taoensso.timbre.profiling :as profiling
|
||||||
|
:refer (pspy pspy* profile defnp p p*)]))
|
||||||
|
|
||||||
;; Clj only:
|
(ns my-cljs-ns ; Cljs ns => use `:refer-macros`
|
||||||
[taoensso.timbre.profiling :as profiling
|
(:require
|
||||||
:refer (pspy pspy* profile defnp p p*)]))
|
[taoensso.timbre :as timbre
|
||||||
|
:refer-macros (log trace debug info warn error fatal report
|
||||||
|
logf tracef debugf infof warnf errorf fatalf reportf spy)]))
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also use `timbre/refer-timbre` to setup these ns refers automatically (Clj only).
|
You can also use `timbre/refer-timbre` to setup these ns referrals automatically (Clj only).
|
||||||
|
|
||||||
### Logging
|
### Logging
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue