Skip to content

Commit 87fad04

Browse files
committed
added debug logging statement to hash_single
1 parent 0f9468b commit 87fad04

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pydra/utils/hash.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from collections.abc import Mapping
88
from functools import singledispatch
99
from hashlib import blake2b
10+
import logging
1011

1112
# from pathlib import Path
1213
from typing import (
@@ -18,6 +19,8 @@
1819
)
1920
import attrs.exceptions
2021

22+
logger = logging.getLogger("pydra")
23+
2124
try:
2225
from typing import Protocol
2326
except ImportError:
@@ -88,7 +91,8 @@ def hash_single(obj: object, cache: Cache) -> Hash:
8891
h = blake2b(digest_size=16, person=b"pydra-hash")
8992
for chunk in bytes_repr(obj, cache):
9093
h.update(chunk)
91-
cache[objid] = Hash(h.digest())
94+
hsh = cache[objid] = Hash(h.digest())
95+
logger.debug("Hash of %s object is %s", obj, hsh)
9296
return cache[objid]
9397

9498

0 commit comments

Comments
 (0)