In Lua, how can you print the name of the current function, like the C99 __func__ identifier?

Viewed 27503

Something like this:

function foo()
    print( __func__ )
   ...
end

How can it be done?

7 Answers
Related