pub struct LogPlus {
pub level: LevelFilter,
pub log_file: String,
pub max_size: u32,
pub level_filter: RwLock<HashMap<String, LevelFilter>>,
pub fmt_cache: Mutex<VecDeque<Vec<u8>>>,
pub filter: Option<Box<dyn CustomFilter>>,
pub logger_data: Mutex<LogData>,
pub show_process_id: bool,
pub show_thread_info: bool,
pub show_module_path: bool,
pub highlight_keywords: Vec<String>,
pub quickwit_client: Option<QuickwitClient>,
}Expand description
核心日志器
Fields§
§level: LevelFilter§log_file: String§max_size: u32§level_filter: RwLock<HashMap<String, LevelFilter>>§fmt_cache: Mutex<VecDeque<Vec<u8>>>§filter: Option<Box<dyn CustomFilter>>§logger_data: Mutex<LogData>§show_process_id: bool§show_thread_info: bool§show_module_path: bool§highlight_keywords: Vec<String>§quickwit_client: Option<QuickwitClient>Implementations§
Source§impl LogPlus
impl LogPlus
Sourcepub fn new(
level: LevelFilter,
log_file: String,
max_size: u32,
filter: Option<Box<dyn CustomFilter>>,
logger_data: LogData,
show_process_id: bool,
show_thread_info: bool,
show_module_path: bool,
highlight_keywords: Vec<String>,
quickwit_client: Option<QuickwitClient>,
) -> Self
pub fn new( level: LevelFilter, log_file: String, max_size: u32, filter: Option<Box<dyn CustomFilter>>, logger_data: LogData, show_process_id: bool, show_thread_info: bool, show_module_path: bool, highlight_keywords: Vec<String>, quickwit_client: Option<QuickwitClient>, ) -> Self
创建新的日志器实例
Sourcepub fn flush_inner(&self)
pub fn flush_inner(&self)
刷新日志的控制台和文件缓存
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for LogPlus
impl !RefUnwindSafe for LogPlus
impl !UnwindSafe for LogPlus
impl Send for LogPlus
impl Sync for LogPlus
impl Unpin for LogPlus
impl UnsafeUnpin for LogPlus
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