Struct rustracing::log::StdErrorLogFieldsBuilder [−][src]
pub struct StdErrorLogFieldsBuilder<'a>(_);
A specialized span log builder for the standard error log fields.
This builder automatically inserts the field LogField::new("event", "error")
.
Methods
impl<'a> StdErrorLogFieldsBuilder<'a>
[src]
impl<'a> StdErrorLogFieldsBuilder<'a>
ⓘImportant traits for &'a mut Rpub fn kind<T>(&mut self, kind: T) -> &mut Self where
T: Into<Cow<'static, str>>,
[src]
ⓘImportant traits for &'a mut R
pub fn kind<T>(&mut self, kind: T) -> &mut Self where
T: Into<Cow<'static, str>>,
Adds the field LogField::new("error.kind", kind)
.
kind
is the type or "kind" of an error.
E.g., "Exception"
, "OSError"
ⓘImportant traits for &'a mut Rpub fn message<T>(&mut self, message: T) -> &mut Self where
T: Into<Cow<'static, str>>,
[src]
ⓘImportant traits for &'a mut R
pub fn message<T>(&mut self, message: T) -> &mut Self where
T: Into<Cow<'static, str>>,
Adds the field LogField::new("message", message)
.
message
is a concise, human-readable, one-line message explaining the event.
E.g., "Could not connect to backend"
, "Cache invalidation succeeded"
ⓘImportant traits for &'a mut Rpub fn object<T: Error>(&mut self, error: T) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
pub fn object<T: Error>(&mut self, error: T) -> &mut Self
Adds "error.kind"
and "message"
fields.
These values are error.description()
and error.to_string()
respectively.
ⓘImportant traits for &'a mut Rpub fn stack(&mut self) -> &mut Self
[src]
ⓘImportant traits for &'a mut R
pub fn stack(&mut self) -> &mut Self
Adds the field LogField::new("stack", {stack trace})
.
Trait Implementations
impl<'a> Debug for StdErrorLogFieldsBuilder<'a>
[src]
impl<'a> Debug for StdErrorLogFieldsBuilder<'a>
Auto Trait Implementations
impl<'a> Send for StdErrorLogFieldsBuilder<'a>
impl<'a> Send for StdErrorLogFieldsBuilder<'a>
impl<'a> Sync for StdErrorLogFieldsBuilder<'a>
impl<'a> Sync for StdErrorLogFieldsBuilder<'a>