Struct rust_utils::logging::Log
source · [−]pub struct Log { /* private fields */ }
Expand description
An automatic rotating log based on the current date
It logs output like the following
[hh:mm:ss] [LEVEL]: message
Implementations
sourceimpl Log
impl Log
sourcepub fn get(log_name: &str, folder: &str) -> Log
pub fn get(log_name: &str, folder: &str) -> Log
Create a new log handle
Panics: You don’t seem to have a home folder. Make sure $HOME is set.
sourcepub fn line<T: Display>(&self, level: LogLevel, text: T, print_stdout: bool)
pub fn line<T: Display>(&self, level: LogLevel, text: T, print_stdout: bool)
Print a line to the log
This will print any object that implements Display
sourcepub fn line_basic<T: Display>(&self, text: T, print_stdout: bool)
pub fn line_basic<T: Display>(&self, text: T, print_stdout: bool)
Print a line to the log (basic info)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Log
impl Send for Log
impl Sync for Log
impl Unpin for Log
impl UnwindSafe for Log
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more