diff --git a/src/common/connection.py b/src/common/connection.py index c1eafb282..4108aab79 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -470,8 +470,8 @@ class Connection(ConnectionHandlers): self.disconnect(on_purpose = True) self.dispatch('STATUS', 'offline') self.dispatch('CONNECTION_LOST', - (_('Bad fingerprint for "%s"') % self._hostname, - _("Server's key changed, or spy attack."))) + (_('Security error connecting to "%s"') % self._hostname, + _("The server's key has changed, or someone is trying to hack your connection."))) if self.on_connect_auth: self.on_connect_auth(None) self.on_connect_auth = None diff --git a/src/common/xmpp/transports_nb.py b/src/common/xmpp/transports_nb.py index 3e7959641..e566248df 100644 --- a/src/common/xmpp/transports_nb.py +++ b/src/common/xmpp/transports_nb.py @@ -423,7 +423,7 @@ class NonBlockingTcp(PlugIn, IdleObject): # get as many bites, as possible, but not more than RECV_BUFSIZE received = self._recv(RECV_BUFSIZE) except (socket.error, socket.herror, socket.gaierror), e: - log.error("_do_receive: got %s:", e.__class__, exc_info=True) + log.debug("_do_receive: got %s:", e.__class__, exc_info=True) #traceback.print_exc() #print "Current Stack:" #traceback.print_stack() diff --git a/src/gajim.py b/src/gajim.py index b13525eca..de13062d7 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -23,11 +23,11 @@ import urllib import logging consoleloghandler = logging.StreamHandler() -consoleloghandler.setLevel(logging.WARNING) +consoleloghandler.setLevel(1) consoleloghandler.setFormatter( logging.Formatter('%(asctime)s %(name)s: %(levelname)s: %(message)s')) log = logging.getLogger('gajim') -log.setLevel(logging.INFO) +log.setLevel(logging.WARNING) log.addHandler(consoleloghandler) log.propagate = False log = logging.getLogger('gajim.gajim') @@ -53,20 +53,19 @@ def parseLogTarget(arg): return 'gajim.' + arg def parseAndSetLogLevels(arg): - directives = arg.split(',') - for directive in directives: + for directive in arg.split(','): directive = directive.strip() - target, level = directive.split('=') - target = parseLogTarget(target.strip()) + targets, level = directive.rsplit('=', 1) level = parseLogLevel(level.strip()) - - if target == '': - consoleloghandler.setLevel(level) - print "consoleloghandler level set to %s" % level - else: - logger = logging.getLogger(target) - logger.setLevel(level) - print "Logger %s level set to %d" % (target, level) + for target in targets.split('='): + target = parseLogTarget(target.strip()) + if target == '': + consoleloghandler.setLevel(level) + print "consoleloghandler level set to %s" % level + else: + logger = logging.getLogger(target) + logger.setLevel(level) + print "Logger %s level set to %d" % (target, level) def parseOpts(): profile = '' @@ -97,6 +96,7 @@ def parseOpts(): return profile, verbose profile, verbose = parseOpts() +del parseOpts, parseAndSetLogLevels, parseLogTarget, parseLogLevel import message_control