log_calls
log_calls copied to clipboard
Safety valve
It is convenient to decorate entire modules, but one can flood the log easily by doing that. Logging should never be a source of operational problems. One possible solution is to add a mode whereby, when a function is called very often, logging switches to a sampling mode (standard practice with profilers).