summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorArtyom Poptsov <poptsov.artyom@gmail.com>2014-02-22 13:45:49 +0400
committerArtyom Poptsov <poptsov.artyom@gmail.com>2014-02-22 13:45:49 +0400
commita8c63c814dff0c4a97d413bdc1d5c63fbe72b827 (patch)
tree8e974d3cb750be93656e86048a21814b20e9c070 /examples
parentexamples/sssh.scm (print-help, print-version): Improve. (diff)
downloadguile-ssh-a8c63c814dff0c4a97d413bdc1d5c63fbe72b827.tar.gz
examples/sssh.scm: Take log verbosity as an argument of `--ssh-debug'.
* examples/sssh.scm (main): Make `ssh-debug' take the log verbosity as an argument. (print-help-and-exit): Update. * NEWS: Update.
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/sssh.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/sssh.scm b/examples/sssh.scm
index 9d0085c..e95e037 100755
--- a/examples/sssh.scm
+++ b/examples/sssh.scm
@@ -43,6 +43,7 @@
(define *program-name* "sssh")
(define *default-identity-file*
(string-append (getenv "HOME") "/.ssh/id_rsa"))
+(define *default-log-verbosity* "nolog")
(define debug? #f)
@@ -55,7 +56,7 @@
(help (single-char #\h) (value #f))
(version (single-char #\v) (value #f))
(debug (single-char #\d) (value #f))
- (ssh-debug (value #f))))
+ (ssh-debug (value #t))))
;;; Helper procedures
@@ -109,7 +110,7 @@ Options:
--port=<port-number>, -p <port-number> Port number
--identity-file=<file>, -i <file> Path to private key
--debug, -d Debug mode
- --ssh-debug Debug libssh
+ --ssh-debug=<verbosity> Debug libssh
--version, -v Print version
"))
(exit))
@@ -128,7 +129,8 @@ Options:
(identity-file (option-ref options 'identity-file
*default-identity-file*))
(debug-needed? (option-ref options 'debug #f))
- (ssh-debug-needed? (option-ref options 'ssh-debug #f))
+ (ssh-debug (option-ref options 'ssh-debug
+ *default-log-verbosity*))
(help-needed? (option-ref options 'help #f))
(version-needed? (option-ref options 'version #f))
(args (option-ref options '() #f)))
@@ -152,9 +154,7 @@ Options:
#:host host
#:port port
#:identity identity-file
- #:log-verbosity (if ssh-debug-needed?
- 'functions
- 'nolog))))
+ #:log-verbosity (string->symbol ssh-debug))))
(print-debug "3. connect! (ssh_connect_x)\n")
(connect! session)