pub struct Logger { /* private fields */ }Expand description
A simple logger that writes timestamped messages to both stdout and a file.
Implementations§
Source§impl Logger
impl Logger
Sourcepub fn init(path: &str) -> Result<()>
pub fn init(path: &str) -> Result<()>
Initializes the global logger, writing log messages to path.
The log file is created if it does not exist and appended to if
it does. On Unix systems the file is created with 0600
permissions.
§Errors
Returns an error if the file cannot be opened or the logger has already been set.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for Logger
impl RefUnwindSafe for Logger
impl Send for Logger
impl Sync for Logger
impl Unpin for Logger
impl UnsafeUnpin 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