|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
|
|
|
|
|
from inspect import currentframe, getframeinfo |
|
|
|
|
import logging |
|
|
|
|
import sys |
|
|
|
|
import yaml |
|
|
|
|
@ -24,21 +25,15 @@ def getLogger(is_debug):
|
|
|
|
|
logger.addHandler(handler) |
|
|
|
|
return logger |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getFunctionName(): |
|
|
|
|
import sys |
|
|
|
|
return sys._getframe(1).f_code.co_name |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: make output prettier |
|
|
|
|
def dumpObject(obj): |
|
|
|
|
return yaml.dump(obj) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getCurrentFileName() -> str: |
|
|
|
|
from inspect import currentframe, getframeinfo |
|
|
|
|
return currentframe().f_back.f_code.co_filename |
|
|
|
|
|
|
|
|
|
def getLineNum() -> int: |
|
|
|
|
from inspect import currentframe, getframeinfo |
|
|
|
|
return currentframe().f_back.f_lineno |
|
|
|
|
|