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
18
README.md
18
README.md
|
@ -38,18 +38,22 @@ Add the necessary dependency to your [Leiningen][] `project.clj` and use the sup
|
|||
```clojure
|
||||
[com.taoensso/timbre "4.0.0-beta4"] ; Add to your project.clj :dependencies
|
||||
|
||||
(ns my-app ; Your ns
|
||||
(:require [taoensso.timbre :as timbre
|
||||
(ns my-clj-ns ; Clj ns => use `:refer`
|
||||
(:require
|
||||
[taoensso.timbre :as timbre
|
||||
:refer (log trace debug info warn error fatal report
|
||||
logf tracef debugf infof warnf errorf fatalf reportf
|
||||
spy)]
|
||||
|
||||
;; Clj only:
|
||||
logf tracef debugf infof warnf errorf fatalf reportf spy)]
|
||||
[taoensso.timbre.profiling :as profiling
|
||||
:refer (pspy pspy* profile defnp p p*)]))
|
||||
|
||||
(ns my-cljs-ns ; Cljs ns => use `:refer-macros`
|
||||
(:require
|
||||
[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
|
||||
|
||||
|
|
Loading…
Reference in New Issue