Logger icon indicating copy to clipboard operation
Logger copied to clipboard

time_stop function does not work if logging disabled

Open jeffreykemp opened this issue 4 years ago • 0 comments

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.

jeffreykemp avatar Jan 24 '22 01:01 jeffreykemp