Better logging on DHT errors
Timeout errors are common on the dht so log those at debug, but other errors need to (potentially) recieve more attention
This commit is contained in:
parent
250831a86a
commit
4f3b5cd802
1 changed files with 8 additions and 3 deletions
|
@ -235,9 +235,14 @@ class Node(object):
|
|||
known_nodes = {}
|
||||
|
||||
def log_error(err, n):
|
||||
log.debug("error storing blob_hash %s at %s", binascii.hexlify(blob_hash), str(n))
|
||||
log.debug(err.getErrorMessage())
|
||||
log.debug(err.getTraceback())
|
||||
if err.check(protocol.TimeoutError):
|
||||
log.debug(
|
||||
"Timeout while storing blob_hash %s at %s",
|
||||
binascii.hexlify(blob_hash), n)
|
||||
else:
|
||||
log.error(
|
||||
"Unexpected error while storing blob_hash %s at %s: %s",
|
||||
binascii.hexlify(blob_hash), n, err.getErrorMessage())
|
||||
|
||||
def log_success(res):
|
||||
log.debug("Response to store request: %s", str(res))
|
||||
|
|
Loading…
Reference in a new issue