Struct casper_execution_engine::shared::logging::Settings
source · pub struct Settings { /* private fields */ }Expand description
Settings used to initialize the global logger.
Implementations§
source§impl Settings
impl Settings
sourcepub fn new(max_level: LevelFilter) -> Self
pub fn new(max_level: LevelFilter) -> Self
Constructs new Settings, where max_level sets the verbosity level above which messages
will be filtered out.
Off is the lowest level, through Error, Warn, Info, Debug to Trace at the
highest level.
By default, logging of metrics is disabled (see
with_metrics_enabled()), and the logging-style is set
to Style::Structured.
sourcepub fn with_metrics_enabled(self, value: bool) -> Self
pub fn with_metrics_enabled(self, value: bool) -> Self
If true, log messages created via log_metric() and
log_duration() are logged, regardless of the log-level.
sourcepub fn with_style(self, value: Style) -> Self
pub fn with_style(self, value: Style) -> Self
Sets the logging style to structured or human-readable.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for Settings
impl Send for Settings
impl Sync for Settings
impl Unpin for Settings
impl UnwindSafe for Settings
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.