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
impl LogInterceptor
pub fn new(level_filter: LevelFilter) -> Self
pub fn get_level_filter(&self) -> LevelFilter
pub fn to_level(&self) -> Option<Level>
pub fn set_level_filter(&self, level_filter: LevelFilter)
Trait Implementations§
source§impl Clone for LogInterceptor
impl Clone for LogInterceptor
source§impl Debug for LogInterceptor
impl Debug for LogInterceptor
source§impl Intercept for LogInterceptor
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,
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,
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
fn name(&self) -> &str
Auto Trait Implementations§
impl !Freeze for LogInterceptor
impl RefUnwindSafe for LogInterceptor
impl Send for LogInterceptor
impl Sync for LogInterceptor
impl Unpin for LogInterceptor
impl UnwindSafe for LogInterceptor
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more