fn run_forever(&self) {
    loop {
      if let Ok(mut queue) = self.report_queue.lock() {
        if let Some(report) = queue.pop_front() {
          //println!("{}",report);
          let posting_res = self.client.post(&self.target_url)
            .body(report)
            .send();
          if posting_res.is_err() {
            eprintln!("reporting error: {:?}",posting_res);
          }
        }
      }
      else {
        thread::sleep(MINIMAL_PAUSE_TIME);
      }
    }
  }
/// Continuously report queued logs to log server
Continuously report queued logs to log server
Continuously report queued logs to log server
fn run_forever(&self) {
    loop {
      if let Ok(mut queue) = self.report_queue.lock() {
        if let Some(report) = queue.pop_front() {
          //println!("{}",report);
          let posting_res = self.client.post(&self.target_url)
            .body(report)
            .send();
          if posting_res.is_err() {
            eprintln!("reporting error: {:?}",posting_res);
          }
        }
      }
      else {
        thread::sleep(MINIMAL_PAUSE_TIME);
      }
    }
  }
fn run_forever ( & self ) { loop { if let Ok ( mut queue ) = self . report_queue . lock ( ) { if let Some ( report ) = queue . pop_front ( ) { //println!("{}",report); let posting_res = self . client . post ( & self . target_url ) . body ( report ) . send ( ) ; if posting_res . is_err ( ) { eprintln ! ( " " posting_res ) ; } } } else { thread :: sleep ( MINIMAL_PAUSE_TIME ) ; } } }
Continuously report queued logs to log server
Continuously report queued logs to log server
&self
&self