From c993c5068e0f7e22124b1bfb17ad0425fe2b8c83 Mon Sep 17 00:00:00 2001 From: Aravind Vasudevan Date: Thu, 14 Sep 2023 08:46:44 +0000 Subject: subcmds: Use repo logger Bug: b/292704435 Change-Id: Ia3a45d87fc0bf0d4a1ba53050d9c3cd2dba20e55 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/386236 Reviewed-by: Jason Chang Commit-Queue: Aravind Vasudevan Tested-by: Aravind Vasudevan --- subcmds/manifest.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'subcmds/manifest.py') diff --git a/subcmds/manifest.py b/subcmds/manifest.py index f72df348..101240d1 100644 --- a/subcmds/manifest.py +++ b/subcmds/manifest.py @@ -17,6 +17,10 @@ import os import sys from command import PagedCommand +from repo_logging import RepoLogger + + +logger = RepoLogger(__file__) class Manifest(PagedCommand): @@ -132,7 +136,7 @@ to indicate the remote ref to push changes to via 'repo upload'. manifest.SetUseLocalManifests(not opt.ignore_local_manifests) if opt.json: - print("warning: --json is experimental!", file=sys.stderr) + logger.warn("warning: --json is experimental!") doc = manifest.ToDict( peg_rev=opt.peg_rev, peg_rev_upstream=opt.peg_rev_upstream, @@ -159,13 +163,13 @@ to indicate the remote ref to push changes to via 'repo upload'. if output_file != "-": fd.close() if manifest.path_prefix: - print( - f"Saved {manifest.path_prefix} submanifest to " - f"{output_file}", - file=sys.stderr, + logger.warn( + "Saved %s submanifest to %s", + manifest.path_prefix, + output_file, ) else: - print(f"Saved manifest to {output_file}", file=sys.stderr) + logger.warn("Saved manifest to %s", output_file) def ValidateOptions(self, opt, args): if args: -- cgit v1.2.3-54-g00ecf