summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRobey Pointer <robey@lag.net>2008-07-06 15:58:42 -0700
committerRobey Pointer <robey@lag.net>2008-07-06 15:58:42 -0700
commite8748645a374d14f066cab3aefb82bf85c3b73bc (patch)
treea7dcd01b26b9020ae372c3887cf751ed6f564ea7
parent598971096858d0d310ce070d4695f7e471f89489 (diff)
[project @ robey@lag.net-20080706225842-25rg9uk9ksyxxbyf]
fix convoluted logging method
-rw-r--r--paramiko/sftp.py4
-rw-r--r--paramiko/sftp_client.py8
2 files changed, 4 insertions, 8 deletions
diff --git a/paramiko/sftp.py b/paramiko/sftp.py
index dc8e99ac..2296d852 100644
--- a/paramiko/sftp.py
+++ b/paramiko/sftp.py
@@ -128,8 +128,8 @@ class BaseSFTP (object):
self._send_packet(CMD_VERSION, str(msg))
return version
- def _log(self, level, msg):
- self.logger.log(level, msg)
+ def _log(self, level, msg, *args):
+ self.logger.log(level, msg, *args)
def _write_all(self, out):
while len(out) > 0:
diff --git a/paramiko/sftp_client.py b/paramiko/sftp_client.py
index 5791d950..338d19b8 100644
--- a/paramiko/sftp_client.py
+++ b/paramiko/sftp_client.py
@@ -105,12 +105,8 @@ class SFTPClient (BaseSFTP):
return cls(chan)
from_transport = classmethod(from_transport)
- def _log(self, level, msg):
- if issubclass(type(msg), list):
- for m in msg:
- super(SFTPClient, self)._log(level, "[chan " + self.sock.get_name() + "] " + m)
- else:
- super(SFTPClient, self)._log(level, "[chan " + self.sock.get_name() + "] " + msg)
+ def _log(self, level, msg, *args):
+ super(SFTPClient, self)._log(level, "[chan %s] " + msg, *([ self.sock.get_name() ] + list(args)))
def close(self):
"""