MCPcopy Create free account
hub / github.com/numpy/numpy / set_threshold

Function set_threshold

numpy/distutils/log.py:50–62  ·  view source on GitHub ↗
(level, force=False)

Source from the content-addressed store, hash-verified

48good = _global_log.good
49
50def set_threshold(level, force=False):
51 prev_level = _global_log.threshold
52 if prev_level > DEBUG or force:
53 # If we're running at DEBUG, don't change the threshold, as there's
54 # likely a good reason why we're running at this level.
55 _global_log.threshold = level
56 if level <= DEBUG:
57 info('set_threshold: setting threshold to DEBUG level,'
58 ' it can be changed only with force argument')
59 else:
60 info('set_threshold: not changing threshold from DEBUG level'
61 ' %s to %s' % (prev_level, level))
62 return prev_level
63
64def get_threshold():
65 return _global_log.threshold

Callers 1

set_verbosityFunction · 0.85

Calls 1

infoFunction · 0.70

Tested by

no test coverage detected