A few minor superficial tweaks.

* Updated .gitignore
* Added copyright info to README.
* Added Clojure 1.3 dependency to project.clj.
* Cleaned up some arg names in core.clj.

Signed-off-by: Peter Taoussanis <p.taoussanis@gmail.com>
This commit is contained in:
Peter Taoussanis 2012-06-12 22:02:24 +07:00
parent f1319b57e7
commit 5f1862a334
4 changed files with 20 additions and 13 deletions

18
.gitignore vendored
View File

@ -1,9 +1,13 @@
/docs/
/lib/
/logs/
/classes/
/target/
/target
/lib
/classes
/checkouts
/logs
/docs
pom.xml
*.jar
*.class
*.sh
.lein*
pom.xml
.lein-deps-sum
.lein-failures
.lein-plugins

View File

@ -132,4 +132,6 @@ I'm also on Twitter: [@ptaoussanis](https://twitter.com/#!/ptaoussanis).
## License
Copyright &copy; 2012 Peter Taoussanis
Distributed under the [Eclipse Public License](http://www.eclipse.org/legal/epl-v10.html), the same as Clojure.

View File

@ -2,8 +2,9 @@
:description "Simple, flexible, all-Clojure logging. No XML!"
:url "https://github.com/ptaoussanis/timbre"
:license {:name "Eclipse Public License"}
:dependencies [[clj-stacktrace "0.2.4"]
[com.draines/postal "1.7.1"
:dependencies [[org.clojure/clojure "1.3.0"]
[clj-stacktrace "0.2.4"]
[com.draines/postal "1.7.1"
:exclusions [org.clojure.contrib/repl-utils]]]
:profiles {:1.3 {:dependencies [[org.clojure/clojure "1.3.0"]]}
:1.4 {:dependencies [[org.clojure/clojure "1.4.0"]]}

View File

@ -65,7 +65,7 @@
;; {:from "me@draines.com" :to "foo@example.com"}
:postal nil}}))
(defn set-config! [ks val] (swap! config assoc-in ks val))
(defn set-config! [[k & ks] val] (swap! config assoc-in (cons k ks) val))
(defn set-level! [level] (set-config! [:current-level] level))
;;;; Define and sort logging levels
@ -182,9 +182,9 @@
;; Automatically re-cache any time appenders change
(add-watch
config "appender-watch"
(fn [key ref old new]
(when (not= (dissoc old :current-level)
(dissoc new :current-level))
(fn [key ref old-state new-state]
(when (not= (dissoc old-state :current-level)
(dissoc new-state :current-level))
(cache-appenders!))))
;;;; Define logging macros