From 5f1862a3347c61395fd3572d8f31f189eeb48872 Mon Sep 17 00:00:00 2001
From: Peter Taoussanis
Date: Tue, 12 Jun 2012 22:02:24 +0700
Subject: [PATCH] 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
---
.gitignore | 18 +++++++++++-------
README.md | 2 ++
project.clj | 5 +++--
src/timbre/core.clj | 8 ++++----
4 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/.gitignore b/.gitignore
index 0c00be2..b979529 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,13 @@
-/docs/
-/lib/
-/logs/
-/classes/
-/target/
+/target
+/lib
+/classes
+/checkouts
+/logs
+/docs
+pom.xml
*.jar
+*.class
*.sh
-.lein*
-pom.xml
\ No newline at end of file
+.lein-deps-sum
+.lein-failures
+.lein-plugins
\ No newline at end of file
diff --git a/README.md b/README.md
index a9a753a..c1edce3 100644
--- a/README.md
+++ b/README.md
@@ -132,4 +132,6 @@ I'm also on Twitter: [@ptaoussanis](https://twitter.com/#!/ptaoussanis).
## License
+Copyright © 2012 Peter Taoussanis
+
Distributed under the [Eclipse Public License](http://www.eclipse.org/legal/epl-v10.html), the same as Clojure.
\ No newline at end of file
diff --git a/project.clj b/project.clj
index 00acf05..f3c4b6d 100644
--- a/project.clj
+++ b/project.clj
@@ -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"]]}
diff --git a/src/timbre/core.clj b/src/timbre/core.clj
index bfb023b..c0afd3a 100644
--- a/src/timbre/core.clj
+++ b/src/timbre/core.clj
@@ -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