-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
Allow logging timings to a logger #9
Comments
Hm. It never occurred to be me because profilehooks is basically a bunch of hacks for interactive debugging, while logging timings is something that smells of production use. |
Logging the timings in function calls is very useful for debugging things like web clients that may have intermittent errors. |
I'm thinking about what the interface should be like. from profilehooks import timecall
@timecall(logger='loggername') would work, but wouldn't it be tedious to repeat that every time? |
I did a fork where I implemented it basically like that https://github.com/dwighthubbard/profilehooks although I used log_name and log_level to specify the logging. |
Would you care to create a pull request? |
Would there be any reason not to allow an option to have the timeit decorator be able to log the information to a logger instead of sys.stderr?
The text was updated successfully, but these errors were encountered: