Skip to content

time_stop function does not work if logging disabled #254

@jeffreykemp

Description

@jeffreykemp

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions