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/forall.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'subcmds/forall.py') diff --git a/subcmds/forall.py b/subcmds/forall.py index 9a02c49f..287f2e04 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py @@ -28,8 +28,10 @@ from command import DEFAULT_LOCAL_JOBS from command import MirrorSafeCommand from command import WORKER_BATCH_SIZE from error import ManifestInvalidRevisionError +from repo_logging import RepoLogger +logger = RepoLogger(__file__) _CAN_COLOR = [ "branch", "diff", @@ -293,10 +295,10 @@ without iterating through the remaining projects. rc = rc or errno.EINTR except Exception as e: # Catch any other exceptions raised - print( - "forall: unhandled error, terminating the pool: %s: %s" - % (type(e).__name__, e), - file=sys.stderr, + logger.error( + "forall: unhandled error, terminating the pool: %s: %s", + type(e).__name__, + e, ) rc = rc or getattr(e, "errno", 1) if rc != 0: -- cgit v1.2.3-54-g00ecf