Remove the ANDROID_ENABLE_TOOL_LOGGING environment variable

Reduce the number of variables required to toggle logging. This simplifies configuration and usage.

Test: atest run_tool_with_logging_test
Bug: 331638854
Change-Id: I6f2a820b59a0d1f45aba9ffb3e33e7ace601e9c6
This commit is contained in:
Zhuoyao Zhang
2024-05-07 22:18:37 +00:00
parent 5a99056218
commit ef1c03f997
2 changed files with 4 additions and 41 deletions

View File

@@ -1112,8 +1112,8 @@ function run_tool_with_logging() {
local tool_binary="$1"
shift
# If logging is not enabled or the logger is not configured, run the original command and return.
if [[ "${ANDROID_ENABLE_TOOL_LOGGING}" != "true" ]] || [[ -z "${ANDROID_TOOL_LOGGER}" ]]; then
# If the logger is not configured, run the original command and return.
if [[ -z "${ANDROID_TOOL_LOGGER}" ]]; then
"${tool_binary}" "${@}"
return $?
fi