def fmt(message, prefix):
    """
    Formats the given message by adding `prefix` at the start of each line.

    If the message is multi-line then split it according to the end-of-line
    terminators and add the prefix string to the start of each line.
    The `prefix` is not added to the beginning of a line if the line is
    completely empty (only whitespace).
    """
    message = str(message).splitlines(True)
    if not message:
        return prefix
    output = ""
    for index, line in enumerate(message):
        if index >= 1 and not line.strip():
            output += line
        else:
            output += "{} {}".format(prefix, line)
    return output