I'm writing a module for a logger and I want it to add a prefix each time the function dlog()
is being called with the filename of the file calling the function. Right now I have to call it each time like this:
dlog(__filename + " log text");
Is there a way to detect the name of the file calling the function without this?