pub struct LogMessage {
pub timestamp_ms: u64,
pub tag: LogTag,
pub level: LogLevel,
pub appid: Option<String>,
pub path: Option<String>,
pub target: Option<String>,
pub message: String,
}Expand description
Structured log message forwarded to system loggers and network sinks.
Fields§
§timestamp_ms: u64§tag: LogTag§level: LogLevel§appid: Option<String>§path: Option<String>§target: Option<String>§message: StringImplementations§
Source§impl LogMessage
impl LogMessage
pub fn new(tag: LogTag, message: impl Into<String>) -> Self
pub fn with_level(self, level: LogLevel) -> Self
pub fn with_appid(self, appid: impl Into<String>) -> Self
pub fn with_path(self, path: impl Into<String>) -> Self
pub fn with_target(self, target: impl Into<String>) -> Self
Trait Implementations§
Source§impl Clone for LogMessage
impl Clone for LogMessage
Source§fn clone(&self) -> LogMessage
fn clone(&self) -> LogMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 LogMessage
impl Debug for LogMessage
Source§impl Default for LogMessage
impl Default for LogMessage
Auto Trait Implementations§
impl Freeze for LogMessage
impl RefUnwindSafe for LogMessage
impl Send for LogMessage
impl Sync for LogMessage
impl Unpin for LogMessage
impl UnsafeUnpin for LogMessage
impl UnwindSafe for LogMessage
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