Compare commits

..

No commits in common. "0139dff41c409f1b41758951ad93b5aa6674fc47" and "5238a083094b9e8aa83ab9dc64b72c3cbb7437cc" have entirely different histories.

2 changed files with 0 additions and 20 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
build/
*.egg-info/

View File

@ -104,24 +104,6 @@ class MyLogger:
self._q.put_nowait(s) self._q.put_nowait(s)
except Exception: except Exception:
pass pass
def debug_params(name, d, maxlen=100):
"""Compact debug output: show all keys but truncate long values."""
if not isinstance(d, dict):
debug(f'{name}: {d}')
return
summary = {}
for k, v in d.items():
s = str(v)
if len(s) > maxlen:
summary[k] = s[:maxlen] + f'...({len(s)}ch)'
elif isinstance(v, list) and len(v) > 3:
summary[k] = f'[{len(v)} items]'
else:
summary[k] = v
debug(f'{name}: {summary}')
def clientinfo(message): def clientinfo(message):
frame_info = inspect.currentframe() frame_info = inspect.currentframe()