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
|
```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
|
||||||
|
[taoensso.timbre :as timbre
|
||||||
:refer (log trace debug info warn error fatal report
|
:refer (log trace debug info warn error fatal report
|
||||||
logf tracef debugf infof warnf errorf fatalf reportf
|
logf tracef debugf infof warnf errorf fatalf reportf spy)]
|
||||||
spy)]
|
|
||||||
|
|
||||||
;; Clj only:
|
|
||||||
[taoensso.timbre.profiling :as profiling
|
[taoensso.timbre.profiling :as profiling
|
||||||
:refer (pspy pspy* profile defnp p p*)]))
|
: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
|
### Logging
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue