-
Notifications
You must be signed in to change notification settings - Fork 677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to change logger depth to go "down" one level? #1122
Comments
That's not really feasible, because the I'd recommend leaving it as it is. Otherwise, it would be confusing and inaccurate anyway: the logging call is made within If it really bothers you, I think you can get away with using a custom |
Hi,
I would like to create a helper function that can record the duration of a function call, like this:
Right now, the output looks like this:
However, for the cases that I use the timeit function as decorator, I would like the module name to be bind to the function itself, not the context that defines the function, that is, make the code behaves like the following:
This would mean to go "down" one level in the frames, but I am not sure how to do that. Setting opt(depth=-1) does not help because it will be selelcting the bottom of the caller stack.
Any ideas?
The text was updated successfully, but these errors were encountered: