2
0
mirror of https://github.com/ComradCollective/Comrad synced 2024-11-01 21:40:32 +00:00
Comrad/komrade/utils.py
quadrismegistus cd887b528a cool stuff
2020-09-05 17:26:37 +01:00

15 lines
400 B
Python

class KomradeException(Exception): pass
# make sure komrade is on path
import sys,os
sys.path.append(os.path.dirname(__file__))
import inspect
class Logger(object):
def log(self,*x):
curframe = inspect.currentframe()
calframe = inspect.getouterframes(curframe, 2)
mytype = type(self).__name__
caller = calframe[1][3]
print(f'\n[{mytype}.{caller}()]',*x)