[#101] Fix README instructions for cljs ns imports

This commit is contained in:
Peter Taoussanis 2015-05-29 09:18:07 +07:00
parent 379bf9d876
commit fc56b8f86d
1 changed files with 13 additions and 9 deletions

View File

@ -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