ndb logging: add arroba to traceback stack frames

pull/1731/head
Ryan Barrett 2025-01-27 21:21:41 -08:00
rodzic ca86534f21
commit 47d77a03cb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6BE31FDF4776E9D4
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -54,7 +54,8 @@ def only_lookups(record):
if '\nkeys {' in msg:
if id := KEYS_ID_RE.search(msg):
stack = [frame for frame in traceback.extract_stack()[:-1]
if frame.filename.startswith('/workspace/')
if (frame.filename.startswith('/workspace/')
or 'arroba' in frame.filename)
or (frame.filename.startswith('/Users/ryan/src/')
and '/lib/' not in frame.filename)]
new_msg = id.group(1) + '\n' + ''.join(traceback.format_list(stack))