Struct rbatis::plugin::intercept_log::LogInterceptor

source ·
pub struct LogInterceptor {
    pub level_filter: AtomicUsize,
}
Expand description

LogInterceptor

Fields§

§level_filter: AtomicUsize

control log off,or change log level. 0=Off, 1=Error, 2=Warn, 3=Info, 4=Debug, 5=Trace

Implementations§

source§

impl LogInterceptor

source

pub fn new(level_filter: LevelFilter) -> Self

source

pub fn get_level_filter(&self) -> LevelFilter

source

pub fn to_level(&self) -> Option<Level>

source

pub fn set_level_filter(&self, level_filter: LevelFilter)

Trait Implementations§

source§

impl Clone for LogInterceptor

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LogInterceptor

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Intercept for LogInterceptor

source§

fn before<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, task_id: i64, _rb: &'life1 dyn Executor, sql: &'life2 mut String, args: &'life3 mut Vec<Value>, _result: ResultType<&'life4 mut Result<ExecResult, Error>, &'life5 mut Result<Vec<Value>, Error>> ) -> Pin<Box<dyn Future<Output = Result<Option<bool>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

task_id maybe is conn_id or tx_id, is_prepared_sql = !args.is_empty(), Read more
source§

fn after<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 self, task_id: i64, _rb: &'life1 dyn Executor, _sql: &'life2 mut String, _args: &'life3 mut Vec<Value>, result: ResultType<&'life4 mut Result<ExecResult, Error>, &'life5 mut Result<Vec<Value>, Error>> ) -> Pin<Box<dyn Future<Output = Result<Option<bool>, Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

task_id maybe is conn_id or tx_id, is_prepared_sql = !args.is_empty(), if return Ok(false) will be return data. return Ok(true) will run next
source§

fn name(&self) -> &str

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V