Fix formatting of script logs

This commit is contained in:
Jeremy Stretch 2024-02-06 17:01:23 -05:00
parent 8a570ec52d
commit da5eb0bb62

View File

@ -442,6 +442,7 @@ class BaseScript:
# A test method is currently active, so log the message using legacy Report logging # A test method is currently active, so log the message using legacy Report logging
if self._current_method: if self._current_method:
# TODO: Use a dataclass for test method logs
self.tests[self._current_method]['log'].append(( self.tests[self._current_method]['log'].append((
timezone.now().isoformat(), timezone.now().isoformat(),
level, level,
@ -457,9 +458,10 @@ class BaseScript:
elif message: elif message:
# Record to the script's log # Record to the script's log
self.messages.append( self.messages.append({
(level, str(message)) 'status': level,
) 'message': str(message),
})
# Record to the system log # Record to the system log
if obj: if obj: