I found similar questions here, but my question is bit different... I have log() function as staticmethod in MyUtil class:
class MyUtil(object):
@staticmethod
def log(message, level):
...
but now I have to know from which class/object this staticmethod was called? For example:
class Deployer(object):
def deploy(self):
...
MyUtil.log ("Starting deployment", "info")
...
Is it possible to get and log this "Deployer" class name from MyUtil.log function?
(I'm aware that this is very un-OO and probably never useful in a well written program, but anyway...)