Updated in reponse to comments in pull/234, changed some more print statements into logger calls
This commit is contained in:
parent
5e93256be6
commit
da687134e2
|
@ -97,10 +97,7 @@ class outgoingSynSender(threading.Thread):
|
||||||
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||||
sock.settimeout(20)
|
sock.settimeout(20)
|
||||||
if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none' and verbose >= 2:
|
if shared.config.get('bitmessagesettings', 'socksproxytype') == 'none' and verbose >= 2:
|
||||||
#shared.printLock.acquire()
|
|
||||||
#print 'Trying an outgoing connection to', HOST, ':', PORT
|
|
||||||
logger.info('Trying an outgoing connection to %s:%s' % (HOST, PORT))
|
logger.info('Trying an outgoing connection to %s:%s' % (HOST, PORT))
|
||||||
#shared.printLock.release()
|
|
||||||
# sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
# sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
elif shared.config.get('bitmessagesettings', 'socksproxytype') == 'SOCKS4a':
|
elif shared.config.get('bitmessagesettings', 'socksproxytype') == 'SOCKS4a':
|
||||||
if verbose >= 2:
|
if verbose >= 2:
|
||||||
|
@ -1084,7 +1081,7 @@ class receiveDataThread(threading.Thread):
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
logger.info('This was NOT on acknowledgement bound for me.')
|
logger.info('This was NOT on acknowledgement bound for me.')
|
||||||
# logger.info("Ack data for which I'm watching: %s" % ackdataForWhichImWatching)
|
logger.debug("Ack data for which I'm watching: %s" % ackdataForWhichImWatching)
|
||||||
|
|
||||||
# This is not an acknowledgement bound for me. See if it is a message
|
# This is not an acknowledgement bound for me. See if it is a message
|
||||||
# bound for me by trying to decrypt it with my private keys.
|
# bound for me by trying to decrypt it with my private keys.
|
||||||
|
@ -1094,11 +1091,11 @@ class receiveDataThread(threading.Thread):
|
||||||
encryptedData[readPosition:])
|
encryptedData[readPosition:])
|
||||||
toRipe = key # This is the RIPE hash of my pubkeys. We need this below to compare to the destination_ripe included in the encrypted data.
|
toRipe = key # This is the RIPE hash of my pubkeys. We need this below to compare to the destination_ripe included in the encrypted data.
|
||||||
initialDecryptionSuccessful = True
|
initialDecryptionSuccessful = True
|
||||||
print 'EC decryption successful using key associated with ripe hash:', key.encode('hex')
|
logger.info('EC decryption successful using key associated with ripe hash: %s' % str(key.encode('hex')))
|
||||||
break
|
break
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
pass
|
pass
|
||||||
# print 'cryptorObject.decrypt Exception:', err
|
logger.debug('cryptorObject.decrypt Exception: %s' % str(err))
|
||||||
if not initialDecryptionSuccessful:
|
if not initialDecryptionSuccessful:
|
||||||
# This is not a message bound for me.
|
# This is not a message bound for me.
|
||||||
logger.info('Length of time program spent failing to decrypt this message %s seconds' %
|
logger.info('Length of time program spent failing to decrypt this message %s seconds' %
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
|
|
||||||
log_level = 'DEBUG' # Get from a config file at some point?
|
# TODO(xj9): Get from a config file at some point?
|
||||||
|
log_level = 'DEBUG'
|
||||||
|
|
||||||
logging.config.dictConfig({
|
logging.config.dictConfig({
|
||||||
'version': 1,
|
'version': 1,
|
||||||
|
|
Reference in New Issue
Block a user