Returning the name of function used

Hi All

In my script, I can call on several functions. I have a logging function that is called by any of these functions. What I would like is some way of identifying which function I am using and pass this to the log function as some parameter.

Is there some built in command or way of return the name of the function I am using similar to basename for instance? The only solution I can see currently is to define a name within the function. I'm happy to do this if its the only way to go.

Rgds

Don't think (I might be wrong) you can get to the function name reliably - take look at this link, but you can get the line number: $LINENO

Thank you. I'll have a look at that now. Must admit, I've asked around my office too but no one has any ideas on whether its even possible.

Rgds

In bash, the name of the current function is in "$FUNCNAME".