def newlines_to_spaces(text: str) -> str:
    """
    Remove all newlines from given text so it can be printed on a single line in action logs.

    :param text: a log text
    :return: the given text with all newlines replaced by simple spaces
    """
    return text.replace("\r", "").replace("\n", " ")