summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Vasudevan <aravindvasudev@google.com>2023-09-06 18:01:20 +0000
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-09-11 21:38:55 +0000
commit57718974599a266e99174cf3892ed4a06a87dcbe (patch)
treee9052a14f1da122b9018904b6378f039f9cdeffd
parent56a5a01c659ab005d9a0820f16e927e6253ab80c (diff)
downloadgit-repo-57718974599a266e99174cf3892ed4a06a87dcbe.tar.gz
start: Use repo logger
Bug: b/292704435 Change-Id: I7b8988207dfdcf0ffc283a48499611892ef5187d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/385534 Tested-by: Aravind Vasudevan <aravindvasudev@google.com> Reviewed-by: Jason Chang <jasonnc@google.com> Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
-rw-r--r--subcmds/start.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/subcmds/start.py b/subcmds/start.py
index 7a42b26c..fd177f9e 100644
--- a/subcmds/start.py
+++ b/subcmds/start.py
@@ -13,7 +13,6 @@
13# limitations under the License. 13# limitations under the License.
14 14
15import functools 15import functools
16import sys
17from typing import NamedTuple 16from typing import NamedTuple
18 17
19from command import Command 18from command import Command
@@ -23,6 +22,10 @@ from git_command import git
23from git_config import IsImmutable 22from git_config import IsImmutable
24from progress import Progress 23from progress import Progress
25from project import Project 24from project import Project
25from repo_logging import RepoLogger
26
27
28logger = RepoLogger(__file__)
26 29
27 30
28class ExecuteOneResult(NamedTuple): 31class ExecuteOneResult(NamedTuple):
@@ -95,10 +98,7 @@ revision specified in the manifest.
95 nb, branch_merge=branch_merge, revision=revision 98 nb, branch_merge=branch_merge, revision=revision
96 ) 99 )
97 except Exception as e: 100 except Exception as e:
98 print( 101 logger.error("error: unable to checkout %s: %s", project.name, e)
99 "error: unable to checkout %s: %s" % (project.name, e),
100 file=sys.stderr,
101 )
102 error = e 102 error = e
103 return ExecuteOneResult(project, error) 103 return ExecuteOneResult(project, error)
104 104
@@ -136,10 +136,10 @@ revision specified in the manifest.
136 136
137 if err_projects: 137 if err_projects:
138 for p in err_projects: 138 for p in err_projects:
139 print( 139 logger.error(
140 "error: %s/: cannot start %s" 140 "error: %s/: cannot start %s",
141 % (p.RelPath(local=opt.this_manifest_only), nb), 141 p.RelPath(local=opt.this_manifest_only),
142 file=sys.stderr, 142 nb,
143 ) 143 )
144 msg_fmt = "cannot start %d project(s)" 144 msg_fmt = "cannot start %d project(s)"
145 self.git_event_log.ErrorEvent( 145 self.git_event_log.ErrorEvent(