mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2025-05-05 10:34:59 -04:00
Use module loggers rather than the root logger. Exceptions caused by bad clients shouldn't cause ERROR level logging. Fix sql logging to use 'repr' rather than 'str'
This commit is contained in:
parent
32090aee16
commit
dfdda2c871
8 changed files with 17 additions and 10 deletions
|
@ -30,7 +30,7 @@ logger = logging.getLogger(__name__)
|
|||
def check_event_content_hash(event, hash_algorithm=hashlib.sha256):
|
||||
"""Check whether the hash for this PDU matches the contents"""
|
||||
computed_hash = _compute_content_hash(event, hash_algorithm)
|
||||
logging.debug("Expecting hash: %s", encode_base64(computed_hash.digest()))
|
||||
logger.debug("Expecting hash: %s", encode_base64(computed_hash.digest()))
|
||||
if computed_hash.name not in event.hashes:
|
||||
raise SynapseError(
|
||||
400,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue