pub struct BashLogger {
pub timestamps: bool,
pub color: bool,
pub min_level: BashLogLevel,
pub log_file: Option<String>,
}Expand description
Bash logging framework generator.
Fields§
§timestamps: boolWhether to include timestamps.
color: boolWhether to use ANSI color codes.
min_level: BashLogLevelMinimum log level to emit.
log_file: Option<String>Log file path (if None, only stdout/stderr).
Implementations§
Source§impl BashLogger
impl BashLogger
Sourcepub fn with_timestamps(self) -> Self
pub fn with_timestamps(self) -> Self
Enable timestamps.
Sourcepub fn with_color(self) -> Self
pub fn with_color(self) -> Self
Enable ANSI color output.
Sourcepub fn with_min_level(self, level: BashLogLevel) -> Self
pub fn with_min_level(self, level: BashLogLevel) -> Self
Set minimum log level.
Sourcepub fn with_log_file(self, path: &str) -> Self
pub fn with_log_file(self, path: &str) -> Self
Set log file path.
Sourcepub fn emit_framework(&self) -> String
pub fn emit_framework(&self) -> String
Emit the logging framework functions.
Trait Implementations§
Source§impl Clone for BashLogger
impl Clone for BashLogger
Source§fn clone(&self) -> BashLogger
fn clone(&self) -> BashLogger
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for BashLogger
impl RefUnwindSafe for BashLogger
impl Send for BashLogger
impl Sync for BashLogger
impl Unpin for BashLogger
impl UnsafeUnpin for BashLogger
impl UnwindSafe for BashLogger
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