pub struct LogfmtLayout { /* private fields */ }
Expand description
A logfmt layout for formatting log records.
Output format:
timestamp=2025-03-31T21:04:28.986032+08:00 level=TRACE module=rs_log position=main.rs:22 message="Hello trace!"
timestamp=2025-03-31T21:04:28.991233+08:00 level=DEBUG module=rs_log position=main.rs:23 message="Hello debug!"
timestamp=2025-03-31T21:04:28.991239+08:00 level=INFO module=rs_log position=main.rs:24 message="Hello info!"
timestamp=2025-03-31T21:04:28.991273+08:00 level=WARN module=rs_log position=main.rs:25 message="Hello warn!"
timestamp=2025-03-31T21:04:28.991277+08:00 level=ERROR module=rs_log position=main.rs:26 message="Hello err!"
§Examples
use logforth_layout_logfmt::LogfmtLayout;
let layout = LogfmtLayout::default();
Implementations§
Trait Implementations§
Source§impl Clone for LogfmtLayout
impl Clone for LogfmtLayout
Source§fn clone(&self) -> LogfmtLayout
fn clone(&self) -> LogfmtLayout
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 LogfmtLayout
impl Debug for LogfmtLayout
Source§impl Default for LogfmtLayout
impl Default for LogfmtLayout
Source§fn default() -> LogfmtLayout
fn default() -> LogfmtLayout
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LogfmtLayout
impl RefUnwindSafe for LogfmtLayout
impl Send for LogfmtLayout
impl Sync for LogfmtLayout
impl Unpin for LogfmtLayout
impl UnwindSafe for LogfmtLayout
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