superoject: log error message in the 'fmt' field also.

Tested:
+ Verified error messages are being collected.

Bug: [google internal] b/193711236
Change-Id: I6c608a2af332ccd38722b7f83a82e5ac8fa143db
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/317162
Reviewed-by: Xin Li <delphij@google.com>
Tested-by: Raman Tenneti <rtenneti@google.com>
This commit is contained in:
Raman Tenneti 2021-09-02 16:13:06 -07:00
parent c63328e5ff
commit 7f8bd85184

View File

@ -128,7 +128,7 @@ class Superproject(object):
"""Logs message to stderr and _git_event_log.""" """Logs message to stderr and _git_event_log."""
if self._print_messages: if self._print_messages:
print(message, file=sys.stderr) print(message, file=sys.stderr)
self._git_event_log.ErrorEvent(message, '') self._git_event_log.ErrorEvent(message, f'{message}')
def _LogError(self, message): def _LogError(self, message):
"""Logs error message to stderr and _git_event_log.""" """Logs error message to stderr and _git_event_log."""