I have many scripts in myapp/models and, for logging purposes, I'd like to know what module is executing to store this information in database.
How can I accomplish that? I've tried __main__.__file__ but it contains 'web2py.py'. Obviously it's not what I'm looking for. Need help. -- Vinicius Assef.