pub struct LogConfig {
pub verbosity: u8,
pub output: Option<PathBuf>,
pub format: LogFormat,
}Expand description
Bundle of tunables consumed by build_logs_layer and
install_logs_only.
Mirrors the legacy positional triple (level, path, format)
that log_init_with_format takes; lifting it to a struct
lets the binary share a single value between the OTLP-on and
OTLP-off install paths.
§Examples
use dynomite::core::log::{LogConfig, LogFormat, LOG_NOTICE};
let cfg = LogConfig::new(LOG_NOTICE, None, LogFormat::Json);
assert_eq!(cfg.verbosity, LOG_NOTICE);
assert_eq!(cfg.format, LogFormat::Json);Fields§
§verbosity: u8Numeric verbosity (0..=LOG_LEVEL_MAX).
output: Option<PathBuf>Optional log file. When None, log records flow to standard
error.
format: LogFormatWire shape for emitted records.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogConfig
impl RefUnwindSafe for LogConfig
impl Send for LogConfig
impl Sync for LogConfig
impl Unpin for LogConfig
impl UnsafeUnpin for LogConfig
impl UnwindSafe for LogConfig
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