像linux一样 使用 __func__,__line__,
def debug(message):
import sys
import inspect
callerframerecord = inspect.stack()[1] # 0代表当前行 , 1当前调用
frame = callerframerecord[0]
info = inspect.getframeinfo(frame)
print(info.filename, 'func=%s' % info.function, 'line=%s:' % info.lineno, message)