mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
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>
This commit is contained in:
parent
56a5a01c65
commit
5771897459
@ -13,7 +13,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
import functools
|
||||
import sys
|
||||
from typing import NamedTuple
|
||||
|
||||
from command import Command
|
||||
@ -23,6 +22,10 @@ from git_command import git
|
||||
from git_config import IsImmutable
|
||||
from progress import Progress
|
||||
from project import Project
|
||||
from repo_logging import RepoLogger
|
||||
|
||||
|
||||
logger = RepoLogger(__file__)
|
||||
|
||||
|
||||
class ExecuteOneResult(NamedTuple):
|
||||
@ -95,10 +98,7 @@ revision specified in the manifest.
|
||||
nb, branch_merge=branch_merge, revision=revision
|
||||
)
|
||||
except Exception as e:
|
||||
print(
|
||||
"error: unable to checkout %s: %s" % (project.name, e),
|
||||
file=sys.stderr,
|
||||
)
|
||||
logger.error("error: unable to checkout %s: %s", project.name, e)
|
||||
error = e
|
||||
return ExecuteOneResult(project, error)
|
||||
|
||||
@ -136,10 +136,10 @@ revision specified in the manifest.
|
||||
|
||||
if err_projects:
|
||||
for p in err_projects:
|
||||
print(
|
||||
"error: %s/: cannot start %s"
|
||||
% (p.RelPath(local=opt.this_manifest_only), nb),
|
||||
file=sys.stderr,
|
||||
logger.error(
|
||||
"error: %s/: cannot start %s",
|
||||
p.RelPath(local=opt.this_manifest_only),
|
||||
nb,
|
||||
)
|
||||
msg_fmt = "cannot start %d project(s)"
|
||||
self.git_event_log.ErrorEvent(
|
||||
|
Loading…
Reference in New Issue
Block a user