diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_archive_utils.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_archive_utils.py index 31876c65c03..c425758e0a5 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_archive_utils.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/_archive_utils.py @@ -38,7 +38,7 @@ def upload_source_code(client, break size = size / 1024.0 - logger.warning("Uploading archived source code from '%s'...", tar_file_path) + print("Uploading archived source code from '{}'...".format(tar_file_path)) upload_url = None relative_path = None error_message = "Could not get SAS URL to upload." @@ -62,13 +62,13 @@ def upload_source_code(client, container_name=container_name, blob_name=blob_name, file_path=tar_file_path) - logger.warning("Sending context ({0:.3f} {1}) to registry: {2}...".format( + print("Sending context ({0:.3f} {1}) to registry: {2}...".format( size, unit, registry_name)) return relative_path def _pack_source_code(source_location, tar_file_path, docker_file_path, docker_file_in_tar): - logger.warning("Packing source code into tar to upload...") + print("Packing source code into tar to upload...") ignore_list, ignore_list_size = _load_dockerignore_file(source_location) common_vcs_ignore_list = {'.git', '.gitignore', '.bzr', 'bzrignore', '.hg', '.hgignore', '.svn'} @@ -76,7 +76,7 @@ def _pack_source_code(source_location, tar_file_path, docker_file_path, docker_f def _ignore_check(tarinfo, parent_ignored, parent_matching_rule_index): # ignore common vcs dir or file if tarinfo.name in common_vcs_ignore_list: - logger.warning("Excluding '%s' based on default ignore rules", tarinfo.name) + print("Excluding '{}' based on default ignore rules".format(tarinfo.name)) return True, parent_matching_rule_index if ignore_list is None: diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/build.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/build.py index cd764874184..9bece40fdaf 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/build.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/build.py @@ -95,7 +95,7 @@ def acr_build(cmd, logger.info("'--file or -f' is not provided. '%s' is used.", docker_file_path) source_location = check_remote_source_code(source_location) - logger.warning("Sending context to registry: %s...", registry_name) + print("Sending context to registry: {}...".format(registry_name)) if no_push: is_push_enabled = False @@ -105,7 +105,7 @@ def acr_build(cmd, _warn_unsupported_image_name(image_names) else: is_push_enabled = False - logger.warning("'--image or -t' is not provided. Skipping image push after build.") + print("'--image or -t' is not provided. Skipping image push after build.") docker_build_request = DockerBuildRequest( image_names=image_names, @@ -123,8 +123,8 @@ def acr_build(cmd, run_request=docker_build_request)) run_id = queued_build.run_id - logger.warning("Queued a build with ID: %s", run_id) - logger.warning("Waiting for agent...") + print("Queued a build with ID: {}".format(run_id)) + print("Waiting for agent...") if no_logs: return get_run_with_polling(client, run_id, registry_name, resource_group_name) diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/build_task.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/build_task.py index 659137e677c..67b1a28b117 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/build_task.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/build_task.py @@ -319,8 +319,8 @@ def acr_build_task_run(cmd, BuildTaskBuildRequest(build_task_name=build_task_name))) build_id = queued_build.build_id - logger.warning("Queued a build with ID: %s", build_id) - logger.warning("Waiting for agent...") + print("Queued a build with ID: {}".format(build_id)) + print("Waiting for agent...") if no_logs: return get_build_with_polling(client, build_id, registry_name, resource_group_name) @@ -400,10 +400,10 @@ def acr_build_task_logs(cmd, image=image) try: build_id = paged_builds.get(0)[0].build_id - logger.warning(_get_list_builds_message(base_message="Showing logs of the last created build", - build_task_name=build_task_name, - image=image)) - logger.warning("Build ID: %s", build_id) + print(_get_list_builds_message(base_message="Showing logs of the last created build", + build_task_name=build_task_name, + image=image)) + print("Build ID: {}".format(build_id)) except (AttributeError, KeyError, TypeError, IndexError): raise CLIError(_get_list_builds_message(base_message="Could not find the last created build", build_task_name=build_task_name, diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/run.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/run.py index 8872256af2e..19dc04a4442 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/run.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/run.py @@ -68,7 +68,7 @@ def acr_run(cmd, pass else: source_location = check_remote_source_code(source_location) - logger.warning("Sending context to registry: %s...", registry_name) + print("Sending context to registry: {}...".format(registry_name)) request = FileTaskRunRequest( task_file_path=file, @@ -85,12 +85,12 @@ def acr_run(cmd, run_request=request)) run_id = queued.run_id - logger.warning("Queued a run with ID: %s", run_id) + print("Queued a run with ID: {}".format(run_id)) if no_wait: return queued - logger.warning("Waiting for an agent...") + print("Waiting for an agent...") if no_logs: return get_run_with_polling(client, run_id, registry_name, resource_group_name) diff --git a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/task.py b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/task.py index af85502664c..c5538ade1c5 100644 --- a/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/task.py +++ b/src/command_modules/azure-cli-acr/azure/cli/command_modules/acr/task.py @@ -390,12 +390,12 @@ def acr_task_run(cmd, ) run_id = queued_run.run_id - logger.warning("Queued a run with ID: %s", run_id) + print("Queued a run with ID: {}".format(run_id)) if no_wait: return queued_run - logger.warning("Waiting for an agent...") + print("Waiting for an agent...") if no_logs: return get_run_with_polling(client, run_id, registry_name, resource_group_name) @@ -485,10 +485,10 @@ def acr_task_logs(cmd, image=image) try: run_id = paged_runs.get(0)[0].run_id - logger.warning(_get_list_runs_message(base_message="Showing logs of the last created run", - task_name=task_name, - image=image)) - logger.warning("Run ID: %s", run_id) + print(_get_list_runs_message(base_message="Showing logs of the last created run", + task_name=task_name, + image=image)) + print("Run ID: {}".format(run_id)) except (AttributeError, KeyError, TypeError, IndexError): raise CLIError(_get_list_runs_message(base_message="Could not find the last created run", task_name=task_name,