mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-16 17:12:21 +03:00
Logging: Backport name mangling support for Python 3.7
This commit is contained in:
parent
fdcca005a4
commit
0f3c784f33
@ -291,7 +291,8 @@ class EDMCContextFilter(logging.Filter):
|
||||
|
||||
if frame_class:
|
||||
# See https://en.wikipedia.org/wiki/Name_mangling#Python for how name mangling works.
|
||||
if (name := frame_info.function).startswith("__") and not name.endswith("__"):
|
||||
name = frame_info.function
|
||||
if name.startswith("__") and not name.endswith("__"):
|
||||
name = f'_{frame_class.__class__.__name__}{frame_info.function}'
|
||||
|
||||
# Find __qualname__ of the caller
|
||||
|
Loading…
x
Reference in New Issue
Block a user