pub struct Logger;Expand description
Logger for pt
This struct exists mainly for the python module, so that we can use the same logger with both python and rust.
Implementations§
source§impl Logger
impl Logger
sourcepub fn new() -> Self
pub fn new() -> Self
create a Logger
Creates a new uninitialized Logger object.
sourcepub fn init(log_dir: Option<PathBuf>, max_level: Option<Level>) -> Result<()>
pub fn init(log_dir: Option<PathBuf>, max_level: Option<Level>) -> Result<()>
initializes the logger
Will enable the logger to be used.
Assumes some defaults, use init_customized for more control
sourcepub fn init_mini(max_level: Option<Level>) -> Result<()>
pub fn init_mini(max_level: Option<Level>) -> Result<()>
initializes the logger
Will enable the logger to be used. This is a version that shows less information, useful in cases with only one sender to the logging framework.
Assumes some defaults, use init_customized for more control
sourcepub fn init_customized(
log_to_file: bool,
log_dir: PathBuf,
ansi: bool,
display_filename: bool,
display_level: bool,
display_target: bool,
max_level: Level,
display_thread_ids: bool,
display_thread_names: bool,
display_line_number: bool,
pretty: bool,
show_time: bool,
uptime: bool
) -> Result<()>
pub fn init_customized( log_to_file: bool, log_dir: PathBuf, ansi: bool, display_filename: bool, display_level: bool, display_target: bool, max_level: Level, display_thread_ids: bool, display_thread_names: bool, display_line_number: bool, pretty: bool, show_time: bool, uptime: bool ) -> Result<()>
initializes the logger
Will enable the logger to be used.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnwindSafe for Logger
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