borodache's picture
Create The first initial project
b528a5d verified
Raw
History Blame Contribute Delete
325 Bytes
import inspect
import os
def log_entry():
"""Print entry to file and method."""
frame = inspect.currentframe().f_back
filename = os.path.basename(frame.f_code.co_filename)
function_name = frame.f_code.co_name
line = frame.f_lineno
print(f"[{filename}:{line}] Entering {function_name}()")