pub struct LoggingOption {
pub console: bool,
pub syslog: bool,
pub script_log: bool,
pub max_script_log_message_length: Option<usize>,
}Expand description
Configuration options for logging output destinations.
This struct defines which logging outputs should be enabled. It uses the builder
pattern via derive_builder for convenient configuration. Both console and syslog
logging are disabled by default.
§Platform Support
- Console logging: Available on all platforms
- Syslog logging: Unix-based systems only (Linux, macOS, etc.)
- Memory logging: Available on all platforms
- Max Log Message Length: Maximun length for individual log messages stored in-memory. Defaults to 2Kb if not set.
§Examples
use rex_logger::tracing_logger::config::LoggingOptionBuilder;
let config = LoggingOptionBuilder::default()
.console(true)
.syslog(false)
.build()
.unwrap();Fields§
§console: bool§syslog: bool§script_log: bool§max_script_log_message_length: Option<usize>Trait Implementations§
Source§impl Clone for LoggingOption
impl Clone for LoggingOption
Source§fn clone(&self) -> LoggingOption
fn clone(&self) -> LoggingOption
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 moreSource§impl Debug for LoggingOption
impl Debug for LoggingOption
impl Copy for LoggingOption
Auto Trait Implementations§
impl Freeze for LoggingOption
impl RefUnwindSafe for LoggingOption
impl Send for LoggingOption
impl Sync for LoggingOption
impl Unpin for LoggingOption
impl UnsafeUnpin for LoggingOption
impl UnwindSafe for LoggingOption
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