pub struct CommonLoggingOptions {
pub file: bool,
pub log_dir: Option<PathBuf>,
pub default_level: LogLevel,
pub filter_directives: Option<String>,
pub format: LogFormat,
}Expand description
Options for init_common_logging.
Sensible defaults (Default) give every satellite a pretty console plus a
daily-rotated file sink under ~/.zlayer/logs; tweak only what differs.
Fields§
§file: boolAlso write a daily-rotated file sink (7-file cap) alongside the console.
log_dir: Option<PathBuf>Override the log directory. Defaults to ~/.zlayer/logs.
default_level: LogLevelLevel used when RUST_LOG is unset and no filter_directives are given.
filter_directives: Option<String>Per-crate default filter directives used when RUST_LOG is unset
(e.g. "zlayer_web=debug,tower_http=debug").
format: LogFormatConsole/file format. Defaults to pretty.
Trait Implementations§
Source§impl Clone for CommonLoggingOptions
impl Clone for CommonLoggingOptions
Source§fn clone(&self) -> CommonLoggingOptions
fn clone(&self) -> CommonLoggingOptions
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 moreSource§impl Debug for CommonLoggingOptions
impl Debug for CommonLoggingOptions
Auto Trait Implementations§
impl Freeze for CommonLoggingOptions
impl RefUnwindSafe for CommonLoggingOptions
impl Send for CommonLoggingOptions
impl Sync for CommonLoggingOptions
impl Unpin for CommonLoggingOptions
impl UnsafeUnpin for CommonLoggingOptions
impl UnwindSafe for CommonLoggingOptions
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