pub struct LogOptions {
pub dir: PathBuf,
pub file_name_prefix: String,
pub max_files: usize,
pub default_level: String,
}Expand description
Tuning knobs for init_logging_with_options.
Fields§
§dir: PathBufDirectory the log files are written to (created if missing).
file_name_prefix: StringFilename prefix; the date and a .log suffix are appended by the appender
(e.g. bamboo.2026-05-31.log). Lets co-located apps keep separate files.
max_files: usizeMaximum number of dated files to keep; older ones are deleted on rollover.
default_level: StringLevel filter used when RUST_LOG is not set (e.g. "info" or "debug").
Implementations§
Source§impl LogOptions
impl LogOptions
Sourcepub fn new(dir: impl Into<PathBuf>) -> LogOptions
pub fn new(dir: impl Into<PathBuf>) -> LogOptions
Options writing to dir with the shared defaults (bamboo prefix,
DEFAULT_MAX_LOG_FILES retention, info level).
Trait Implementations§
Source§impl Clone for LogOptions
impl Clone for LogOptions
Source§fn clone(&self) -> LogOptions
fn clone(&self) -> LogOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LogOptions
impl RefUnwindSafe for LogOptions
impl Send for LogOptions
impl Sync for LogOptions
impl Unpin for LogOptions
impl UnsafeUnpin for LogOptions
impl UnwindSafe for LogOptions
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