pub fn print_logs(message: Message, task_ids: Vec<usize>, json: bool) {
    let state = match message {
        Message::StatusResponse(state) => state,
        _ => return,
    };
    if json {
        println!("{}", serde_json::to_string(&state).unwrap());
        return;
    }

    if !task_ids.is_empty() {
        for task_id in task_ids {
            print_log(task_id, &state);
        }
    } else {
        for task_id in state.tasks.keys() {
            print_log(*task_id, &state);
        }
    }
}
/// Print the log ouput of finished tasks.
/// Either print the logs of every task
/// or only print the logs of the specified tasks.
Print the log ouput of finished tasks.
Either print the logs of every task
or only print the logs of the specified tasks.
Print the log ouput of finished tasks . Either print the logs of every task or only print the logs of the specified tasks .
pub fn print_logs(message: Message, task_ids: Vec<usize>, json: bool) {
    let state = match message {
        Message::StatusResponse(state) => state,
        _ => return,
    };
    if json {
        println!("{}", serde_json::to_string(&state).unwrap());
        return;
    }
    if !task_ids.is_empty() {
        for task_id in task_ids {
            print_log(task_id, &state);
        }
    } else {
        for task_id in state.tasks.keys() {
            print_log(*task_id, &state);
        }
    }
}
pub fn print_logs ( message : Message , task_ids : Vec < usize > , json : bool ) { let state = match message { Message :: StatusResponse ( state ) => state , _ => return , } ; if json { println ! ( " " serde_json to_string ( state ) unwrap ( ) ) ; return ; } if ! task_ids . is_empty ( ) { for task_id in task_ids { print_log ( task_id , & state ) ; } } else { for task_id in state . tasks . keys ( ) { print_log ( * task_id , & state ) ; } } }
Print the log ouput of finished tasks.
Print the log ouput of finished tasks .
message
Message
task_ids
Vec<usize>
json
bool
message
Message
task_ids
Vec<usize>
json
bool