process_log_messages

Summary

process_log_messages(errors: list[str] = [], messages: list[str] = [], warnings: list[str] = [], job_was_successful: bool = False)

This function is not just used to process log messages. It also tallies things like which jobs were sucessful and which were errored. The other commands in this file can be used to

Parameters:
  • errors (list[str]) – A list of errors, as collected by the calling process.

  • messages (list[str]) – A list of informational messages, as collected by the calling process.

  • warnings (list[str]) – A list of warning messages, as collected by the calling process.

  • job_was_successful (bool) – The existance of the messages passed into the other parameters normally help classify the state of the job that sent them. For example, if errors are present, it means the job has reached an error state. However, if you set job_was_successful to True, the job will be counted as a success in metrics even if errors are present. As you might expect, this defaults to False.

Importing

from cs_board_tools.errors import process_log_messages