1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
crate::ix!();

/**
  | libevent event log callback
  |
  */
pub extern "C" fn libevent_log_cb(
    severity: i32,
    msg:      *const i8) {

    /*
      | Ignore everything other than errors
      |
      */
    if severity >= EVENT_LOG_ERR.try_into().unwrap() {

        //the c++ threw a runtime error here
        //
        //however since we are in extern "C" for
        //the ffi, we will just log the error
        //
        //return Err(runtime_error(format!("libevent error: {:?}",msg)));
        eprintln!("libevent error: {:?}", msg);
    }
}