Skip to content

Commit 36f8b34

Browse files
committed
Allow rebinding of *ssh-log-levels*
Add earmuffs to ssh-log-levels.
1 parent a725534 commit 36f8b34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/clj_ssh/ssh.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ Licensed under EPL (http://www.eclipse.org/legal/epl-v10.html)"
8080

8181
;; Enable java logging of jsch when in clojure 1.2
8282
(when-feature deftype
83-
(def ssh-log-levels
83+
(def ^{:dynamic true} *ssh-log-levels*
8484
{com.jcraft.jsch.Logger/DEBUG :debug
8585
com.jcraft.jsch.Logger/INFO :info
8686
com.jcraft.jsch.Logger/WARN :warn
@@ -94,7 +94,7 @@ Licensed under EPL (http://www.eclipse.org/legal/epl-v10.html)"
9494
(>= level log-level))
9595
(log
9696
[_ level message]
97-
(logging/log (ssh-log-levels level) message nil "clj-ssh.ssh")))
97+
(logging/log (*ssh-log-levels* level) message nil "clj-ssh.ssh")))
9898

9999
(JSch/setLogger (SshLogger. com.jcraft.jsch.Logger/DEBUG)))
100100

0 commit comments

Comments
 (0)