pub fn read_bunyan_log(logpath: &Path) -> Vec<BunyanLogRecord> {
    let log_contents = fs::read_to_string(logpath).unwrap();
    log_contents
        .split('\n')
        .filter(|line| !line.is_empty())
        .map(|line| serde_json::from_str::<BunyanLogRecord>(line).unwrap())
        .collect::<Vec<BunyanLogRecord>>()
}
/**
 * Read a file containing a Bunyan-format log, returning an array of records.
 */
Read a file containing a Bunyan-format log, returning an array of records.
Read a file containing a Bunyan - format log returning an array of records .
pub fn read_bunyan_log(logpath: &Path) -> Vec<BunyanLogRecord> {
    let log_contents = fs::read_to_string(logpath).unwrap();
    log_contents
        .split('\n')
        .filter(|line| !line.is_empty())
        .map(|line| serde_json::from_str::<BunyanLogRecord>(line).unwrap())
        .collect::<Vec<BunyanLogRecord>>()
}
pub fn read_bunyan_log ( logpath : & Path ) -> Vec < BunyanLogRecord > { let log_contents = fs :: read_to_string ( logpath ) . unwrap ( ) ; log_contents . split ( '\n' ) . filter ( | line | ! line . is_empty ( ) ) . map ( | line | serde_json :: from_str :: < BunyanLogRecord > ( line ) . unwrap ( ) ) . collect :: < Vec < BunyanLogRecord > > ( ) }
Read a file containing a Bunyan-format log, returning an array of records.
Read a file containing a Bunyan - format log returning an array of records .
logpath
&Path
logpath
&Path