Skip to content
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

time_stop function does not work if logging disabled #254

Open
jeffreykemp opened this issue Jan 24, 2022 · 0 comments
Open

time_stop function does not work if logging disabled #254

jeffreykemp opened this issue Jan 24, 2022 · 0 comments

Comments

@jeffreykemp
Copy link

If logging at the debug level is disabled, or the package is compiled with the "noop" option, logger.time_stop (function) will raise the "function returned without value" exception.

Also - it is preferable the code in the time_start and time_stop methods should manage the timers even if debug level logging is disabled; we may want the return value of time_stop (function) even if logging is disabled (e.g. to record the duration of an event elsewhere).

Context: I'm creating a wrapper for the time_start and time_stop methods that will log instrumentation for alerting etc. even if logger is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant