diff --git a/git_trace2_event_log.py b/git_trace2_event_log.py index 46bd5e4b..5b99867b 100644 --- a/git_trace2_event_log.py +++ b/git_trace2_event_log.py @@ -203,8 +203,8 @@ class EventLog(object): error_event = self._CreateEventDict("error") if fmt is None: fmt = msg - error_event["msg"] = msg - error_event["fmt"] = fmt + error_event["msg"] = f"RepoErrorEvent:{msg}" + error_event["fmt"] = f"RepoErrorEvent:{fmt}" self._log.append(error_event) def _GetEventTargetPath(self): diff --git a/tests/test_git_trace2_event_log.py b/tests/test_git_trace2_event_log.py index a6078d38..9d4f24c3 100644 --- a/tests/test_git_trace2_event_log.py +++ b/tests/test_git_trace2_event_log.py @@ -338,8 +338,8 @@ class EventLogTestCase(unittest.TestCase): # Check for 'error' event specific fields. self.assertIn("msg", error_event) self.assertIn("fmt", error_event) - self.assertEqual(error_event["msg"], msg) - self.assertEqual(error_event["fmt"], fmt) + self.assertEqual(error_event["msg"], f"RepoErrorEvent:{msg}") + self.assertEqual(error_event["fmt"], f"RepoErrorEvent:{fmt}") def test_write_with_filename(self): """Test Write() with a path to a file exits with None."""