Skip to content

Commit f685fe9

Browse files
mattemaignas
andauthored
fix: allow warn logging to be disabled via RULES_PYTHON_REPO_DEBUG_VERBOSITY (#2737)
Allows the logging level to be set to `FAIL`, removing `WARN` logging. --------- Co-authored-by: Ignas Anikevicius <240938+aignas@users.noreply.github.com>
1 parent 3d98aee commit f685fe9

3 files changed

Lines changed: 3 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Unreleased changes template.
7878
* (toolchains) Do not try to run `chmod` when downloading non-windows hermetic toolchain
7979
repositories on Windows. Fixes
8080
[#2660](https://github.com/bazel-contrib/rules_python/issues/2660).
81+
* (logging) Allow repo rule logging level to be set to `FAIL` via the `RULES_PYTHON_REPO_DEBUG_VERBOSITY` environment variable.
8182
* (toolchains) The toolchain matching is has been fixed when writing
8283
transitions transitioning on the `python_version` flag.
8384
Fixes [#2685](https://github.com/bazel-contrib/rules_python/issues/2685).

docs/environment-variables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ doing. This is mostly useful for development to debug errors.
101101
Determines the verbosity of logging output for repo rules. Valid values:
102102

103103
* `DEBUG`
104+
* `FAIL`
104105
* `INFO`
105106
* `TRACE`
106107
:::

python/private/repo_utils.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def _logger(mrctx, name = None):
5656

5757
verbosity = {
5858
"DEBUG": 2,
59+
"FAIL": -1,
5960
"INFO": 1,
6061
"TRACE": 3,
6162
}.get(verbosity_level, 0)

0 commit comments

Comments
 (0)