(v, force=False)
| 65 | return _global_log.threshold |
| 66 | |
| 67 | def set_verbosity(v, force=False): |
| 68 | prev_level = _global_log.threshold |
| 69 | if v < 0: |
| 70 | set_threshold(ERROR, force) |
| 71 | elif v == 0: |
| 72 | set_threshold(WARN, force) |
| 73 | elif v == 1: |
| 74 | set_threshold(INFO, force) |
| 75 | elif v >= 2: |
| 76 | set_threshold(DEBUG, force) |
| 77 | return {FATAL:-2,ERROR:-1,WARN:0,INFO:1,DEBUG:2}.get(prev_level, 1) |
| 78 | |
| 79 | |
| 80 | _global_color_map = { |
no test coverage detected