pub fn new(level: &str, log_queries: bool, callback: ThreadsafeFunction<String>) -> Self {
        let mut filter = EnvFilter::new(level);

        if log_queries {
            filter = filter.add_directive("quaint[{is_query}]".parse().unwrap());
        }

        let javascript_cb = EventChannel::new(callback, filter, false);
        let subscriber = EventRegistry::new().with(javascript_cb);

        let subscriber = Subscriber::Normal(subscriber);

        Self {
            subscriber,
            guard: None,
        }
    }
/// Creates a new instance of a logger with the minimum log level.
Creates a new instance of a logger with the minimum log level.
Creates a new instance of a logger with the minimum log level .
pub fn new(level: &str, log_queries: bool, callback: ThreadsafeFunction<String>) -> Self {
        let mut filter = EnvFilter::new(level);
        if log_queries {
            filter = filter.add_directive("quaint[{is_query}]".parse().unwrap());
        }
        let javascript_cb = EventChannel::new(callback, filter, false);
        let subscriber = EventRegistry::new().with(javascript_cb);
        let subscriber = Subscriber::Normal(subscriber);
        Self {
            subscriber,
            guard: None,
        }
    }
pub fn new ( level : & str , log_queries : bool , callback : ThreadsafeFunction < String > ) -> Self { let mut filter = EnvFilter :: new ( level ) ; if log_queries { filter = filter . add_directive ( " " . parse ( ) . unwrap ( ) ) ; } let javascript_cb = EventChannel :: new ( callback , filter , false ) ; let subscriber = EventRegistry :: new ( ) . with ( javascript_cb ) ; let subscriber = Subscriber :: Normal ( subscriber ) ; Self { subscriber , guard : None , } }
Creates a new instance of a logger with the minimum log level.
Creates a new instance of a logger with the minimum log level .
level
&str
log_queries
bool
callback
ThreadsafeFunction<String>