Struct witchcraft_server::logging::api::ServiceLogV1
source · pub struct ServiceLogV1 { /* private fields */ }Expand description
Definition of the service.1 format.
Implementations§
source§impl ServiceLogV1
impl ServiceLogV1
sourcepub fn builder() -> BuilderStage0
pub fn builder() -> BuilderStage0
Returns a new builder.
sourcepub fn level(&self) -> &LogLevel
pub fn level(&self) -> &LogLevel
The logger output level. One of {FATAL,ERROR,WARN,INFO,DEBUG,TRACE} based on log level coding guidelines
sourcepub fn time(&self) -> DateTime<Utc>
pub fn time(&self) -> DateTime<Utc>
RFC3339Nano UTC datetime string when the log event was emitted
sourcepub fn message(&self) -> &str
pub fn message(&self) -> &str
Log message. Palantir Java services using slf4j should not use slf4j placeholders ({}). Logs obtained from 3rd party libraries or services that use slf4j and contain slf4j placeholders will always produce unsafeParams with numeric indexes corresponding to the zero-indexed order of placeholders. Renderers should substitute numeric parameters from unsafeParams and may leave placeholders that do not match indexes as the original placeholder text.
sourcepub fn safe(&self) -> Option<bool>
pub fn safe(&self) -> Option<bool>
Describes the safety of this log event based on prior knowledge within the application which produced the message. This field should not be set to true without total confidence that it is correct. * empty: Considered unsafe unless the logging pipeline has special configuration for this origin. Eventually these will all be equivalent to false. * true: All safe components can be trusted. * false: Event is unsafe and cannot be exported.
sourcepub fn params(&self) -> &BTreeMap<String, Any>
pub fn params(&self) -> &BTreeMap<String, Any>
Known-safe parameters (redaction may be used to make params knowably safe, but is not required).
sourcepub fn org_id(&self) -> Option<&OrganizationId>
pub fn org_id(&self) -> Option<&OrganizationId>
Organization id (if available)
sourcepub fn stacktrace(&self) -> Option<&str>
pub fn stacktrace(&self) -> Option<&str>
Language-specific stack trace. Content is knowably safe. Renderers should substitute named placeholders ({name}, for name as a key) with keyed value from unsafeParams and leave non-matching keys as the original placeholder text.
sourcepub fn unsafe_params(&self) -> &BTreeMap<String, Any>
pub fn unsafe_params(&self) -> &BTreeMap<String, Any>
Unredacted parameters
Additional dimensions that describe the instance of the log event
Trait Implementations§
source§impl Clone for ServiceLogV1
impl Clone for ServiceLogV1
source§fn clone(&self) -> ServiceLogV1
fn clone(&self) -> ServiceLogV1
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ServiceLogV1
impl Debug for ServiceLogV1
source§impl<'de> Deserialize<'de> for ServiceLogV1
impl<'de> Deserialize<'de> for ServiceLogV1
source§fn deserialize<D>(d: D) -> Result<ServiceLogV1, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(d: D) -> Result<ServiceLogV1, D::Error>where
D: Deserializer<'de>,
source§impl From<ServiceLogV1> for BuilderStage4
impl From<ServiceLogV1> for BuilderStage4
source§fn from(value: ServiceLogV1) -> Self
fn from(value: ServiceLogV1) -> Self
source§impl Hash for ServiceLogV1
impl Hash for ServiceLogV1
source§impl Ord for ServiceLogV1
impl Ord for ServiceLogV1
source§fn cmp(&self, other: &ServiceLogV1) -> Ordering
fn cmp(&self, other: &ServiceLogV1) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for ServiceLogV1
impl PartialEq for ServiceLogV1
source§fn eq(&self, other: &ServiceLogV1) -> bool
fn eq(&self, other: &ServiceLogV1) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for ServiceLogV1
impl PartialOrd for ServiceLogV1
source§fn partial_cmp(&self, other: &ServiceLogV1) -> Option<Ordering>
fn partial_cmp(&self, other: &ServiceLogV1) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read moresource§impl Serialize for ServiceLogV1
impl Serialize for ServiceLogV1
impl Eq for ServiceLogV1
impl StructuralEq for ServiceLogV1
impl StructuralPartialEq for ServiceLogV1
Auto Trait Implementations§
impl RefUnwindSafe for ServiceLogV1
impl Send for ServiceLogV1
impl Sync for ServiceLogV1
impl Unpin for ServiceLogV1
impl UnwindSafe for ServiceLogV1
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
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.