def METHOD_NAME(file_source, bsd_formatter, hostname, program):
    log_message = LogMessage().hostname(hostname).program(program)
    input_message = bsd_formatter.format_message(log_message)
    expected_message = bsd_formatter.format_message(log_message.remove_priority())
    file_source.write_log(input_message)
    return expected_message