Skip to content
Snippets Groups Projects
Commit 9d9ef1da authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

move some error/warning to info so it's not printed in stderr by default. Fixes #5609

parent 04db6692
No related branches found
No related tags found
No related merge requests found
......@@ -187,7 +187,7 @@ class SASL(PlugIn):
"""
if not feats.getTag('mechanisms', namespace=NS_SASL):
self.startsasl='not-supported'
log.error('SASL not supported by server')
log.info('SASL not supported by server')
return
self.mecs = []
for mec in feats.getTag('mechanisms', namespace=NS_SASL).getTags(
......@@ -245,7 +245,7 @@ class SASL(PlugIn):
self.startsasl = SASL_IN_PROCESS
raise NodeProcessed
self.startsasl = SASL_FAILURE
log.error('I can only use EXTERNAL, DIGEST-MD5, GSSAPI and PLAIN '
log.info('I can only use EXTERNAL, DIGEST-MD5, GSSAPI and PLAIN '
'mecanisms.')
if self.on_sasl:
self.on_sasl()
......@@ -264,7 +264,7 @@ class SASL(PlugIn):
reason = challenge.getChildren()[0]
except Exception:
reason = challenge
log.error('Failed SASL authentification: %s' % reason)
log.info('Failed SASL authentification: %s' % reason)
if len(self.mecs) > 0:
# There are other mechanisms to test
self.MechanismHandler()
......@@ -340,7 +340,7 @@ class SASL(PlugIn):
self._owner.send(str(Node('response', attrs={'xmlns':NS_SASL})))
else:
self.startsasl = SASL_FAILURE
log.error('Failed SASL authentification: unknown challenge')
log.info('Failed SASL authentification: unknown challenge')
if self.on_sasl:
self.on_sasl()
raise NodeProcessed
......@@ -419,7 +419,7 @@ class NonBlockingNonSASL(PlugIn):
def _on_username(self, resp):
if not isResultNode(resp):
log.error('No result node arrived! Aborting...')
log.info('No result node arrived! Aborting...')
return self.on_auth(None)
iq=Iq(typ='set', node=resp)
......@@ -450,7 +450,7 @@ class NonBlockingNonSASL(PlugIn):
query.setTagData('hash', hash_)
self._method='0k'
else:
log.warn("Sequre methods unsupported, performing plain text \
log.warn("Secure methods unsupported, performing plain text \
authentication")
query.setTagData('password', self.password)
self._method = 'plain'
......@@ -464,7 +464,7 @@ class NonBlockingNonSASL(PlugIn):
self.owner._registered_name = self.owner.User+'@'+self.owner.Server+\
'/'+self.owner.Resource
return self.on_auth(self._method)
log.error('Authentication failed!')
log.info('Authentication failed!')
return self.on_auth(None)
......@@ -496,7 +496,7 @@ class NonBlockingBind(PlugIn):
attributes accordingly
"""
if not feats.getTag('bind', namespace=NS_BIND):
log.error('Server does not requested binding.')
log.info('Server does not requested binding.')
# we try to bind resource anyway
#self.bound='failure'
self.bound = []
......@@ -548,10 +548,10 @@ class NonBlockingBind(PlugIn):
func=self._on_session)
return
if resp:
log.error('Binding failed: %s.' % resp.getTag('error'))
log.info('Binding failed: %s.' % resp.getTag('error'))
self.on_bound(None)
else:
log.error('Binding failed: timeout expired.')
log.info('Binding failed: timeout expired.')
self.on_bound(None)
def _on_session(self, resp):
......
......@@ -372,7 +372,7 @@ class NonBlockingClient:
# try to negotiate TLS
if self.incoming_stream_version() != '1.0':
# if stream version is less than 1.0, we can't do more
log.warn('While connecting with type = "tls": stream version ' +
log.info('While connecting with type = "tls": stream version ' +
'is less than 1.0')
self._on_connect()
return
......@@ -382,7 +382,7 @@ class NonBlockingClient:
log.info('TLS supported by remote server. Requesting TLS start.')
self._tls_negotiation_handler()
else:
log.warn('While connecting with type = "tls": TLS unsupported ' +
log.info('While connecting with type = "tls": TLS unsupported ' +
'by remote server')
self._on_connect()
......
......@@ -223,7 +223,7 @@ class NonBlockingTransport(PlugIn):
if hasattr(self, '_owner') and hasattr(self._owner, 'Dispatcher'):
self.on_receive = self._owner.Dispatcher.ProcessNonBlocking
else:
log.warning('No Dispatcher plugged. Received data will not be processed')
log.warn('No Dispatcher plugged. Received data will not be processed')
self.on_receive = None
return
self.on_receive = recv_handler
......@@ -453,7 +453,7 @@ class NonBlockingTCP(NonBlockingTransport, IdleObject):
self._sock.shutdown(socket.SHUT_RDWR)
self._sock.close()
except socket.error, (errnum, errstr):
log.error('Error while disconnecting socket: %s' % errstr)
log.info('Error while disconnecting socket: %s' % errstr)
self.fd = -1
NonBlockingTransport.disconnect(self, do_callback)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment