I am implementing a logger in "C" and the core function is :
void log(Level tag, const char *message)
This function will be called in a client file which is different from my log.c
file.
My question is :
How is it possible for this function to get the name of the caller file without passing it as a parameter (like adding another char *
) argument and then passing it __FILE__
in the caller file ?
Thank you.