diff options
author | David Pursehouse <david.pursehouse@gmail.com> | 2013-11-15 19:31:56 +0900 |
---|---|---|
committer | David Pursehouse <david.pursehouse@gmail.com> | 2013-11-15 19:31:56 +0900 |
commit | 5335d9dc0a6266217d288e7aaf2091739980d841 (patch) | |
tree | d6e6f52f6f8ca8066c0251fd09309d2e94866bde | |
parent | a9a5f69c1affae60fd3c390927e0389325f719a1 (diff) |
Change logging level of "Secsh channel" logs
Log "Secsh channel %d opened" with level DEBUG.
Log "Secsh channel %d open FAILED" with level ERROR.
Logging these with level INFO causes a lot of noise on the console
when using paramiko in an application that makes a lot of connections.
-rw-r--r-- | paramiko/transport.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/paramiko/transport.py b/paramiko/transport.py index 3155d3f8..1fd7c2f3 100644 --- a/paramiko/transport.py +++ b/paramiko/transport.py @@ -1998,7 +1998,7 @@ class Transport (threading.Thread): self.lock.acquire() try: chan._set_remote_channel(server_chanid, server_window_size, server_max_packet_size) - self._log(INFO, 'Secsh channel %d opened.' % chanid) + self._log(DEBUG, 'Secsh channel %d opened.' % chanid) if chanid in self.channel_events: self.channel_events[chanid].set() del self.channel_events[chanid] @@ -2012,7 +2012,7 @@ class Transport (threading.Thread): reason_str = m.get_string() lang = m.get_string() reason_text = CONNECTION_FAILED_CODE.get(reason, '(unknown code)') - self._log(INFO, 'Secsh channel %d open FAILED: %s: %s' % (chanid, reason_str, reason_text)) + self._log(ERROR, 'Secsh channel %d open FAILED: %s: %s' % (chanid, reason_str, reason_text)) self.lock.acquire() try: self.saved_exception = ChannelException(reason, reason_text) @@ -2109,7 +2109,7 @@ class Transport (threading.Thread): m.add_int(self.window_size) m.add_int(self.max_packet_size) self._send_message(m) - self._log(INFO, 'Secsh channel %d (%s) opened.', my_chanid, kind) + self._log(DEBUG, 'Secsh channel %d (%s) opened.', my_chanid, kind) if kind == 'auth-agent@openssh.com': self._forward_agent_handler(chan) elif kind == 'x11': |