diff --git a/CHANGELOG.md b/CHANGELOG.md index b11270cb25..33acd38706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -78,6 +78,7 @@ Unreleased changes template. * (toolchains) Do not try to run `chmod` when downloading non-windows hermetic toolchain repositories on Windows. Fixes [#2660](https://github.com/bazel-contrib/rules_python/issues/2660). +* (logging) Allow repo rule logging level to be set to `FAIL` via the `RULES_PYTHON_REPO_DEBUG_VERBOSITY` environment variable. * (toolchains) The toolchain matching is has been fixed when writing transitions transitioning on the `python_version` flag. Fixes [#2685](https://github.com/bazel-contrib/rules_python/issues/2685). diff --git a/docs/environment-variables.md b/docs/environment-variables.md index d8735cb2d5..9500fa8295 100644 --- a/docs/environment-variables.md +++ b/docs/environment-variables.md @@ -101,6 +101,7 @@ doing. This is mostly useful for development to debug errors. Determines the verbosity of logging output for repo rules. Valid values: * `DEBUG` +* `FAIL` * `INFO` * `TRACE` ::: diff --git a/python/private/repo_utils.bzl b/python/private/repo_utils.bzl index d9ad2449f1..73883a9244 100644 --- a/python/private/repo_utils.bzl +++ b/python/private/repo_utils.bzl @@ -56,6 +56,7 @@ def _logger(mrctx, name = None): verbosity = { "DEBUG": 2, + "FAIL": -1, "INFO": 1, "TRACE": 3, }.get(verbosity_level, 0)