From 06f71d229504efa53254f55326dba49d1bd2bec3 Mon Sep 17 00:00:00 2001 From: willmcgugan Date: Sun, 19 Dec 2010 00:29:58 +0000 Subject: Docstrings and fixes for sftp server git-svn-id: http://pyfilesystem.googlecode.com/svn/trunk@562 67cdc799-7952-0410-af00-57a81ceafa0f --- fs/commands/fsserve.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'fs/commands') diff --git a/fs/commands/fsserve.py b/fs/commands/fsserve.py index 8ed7703..96665a8 100644 --- a/fs/commands/fsserve.py +++ b/fs/commands/fsserve.py @@ -57,6 +57,16 @@ Serves the contents of PATH with one of a number of methods""" elif options.type == 'sftp': from fs.expose.sftp import BaseSFTPServer + import logging + log = logging.getLogger('paramiko') + if options.debug: + log.setLevel(logging.DEBUG) + elif options.verbose: + log.setLevel(logging.INFO) + ch = logging.StreamHandler() + ch.setLevel(logging.DEBUG) + log.addHandler(ch) + if port is None: port = 22 server = BaseSFTPServer((options.addr, port), fs) -- cgit v1.2.1