Struct slog::Record
[−]
[src]
pub struct Record<'a> { /* fields omitted */ }
One logging record
Corresponds to one logging statement like info!(...)
and carries all it's
data: eg. message, immediate key-value pairs and key-value pairs of Logger
used to execute it.
Record is passed to a Logger
, which delivers it to it's own Drain
,
where actual logging processing is implemented.
Methods
impl<'a> Record<'a>
[src]
fn msg(&self) -> &Arguments
Get a log record message
fn level(&self) -> Level
Get record logging level
fn line(&self) -> u32
Get line number
fn location(&self) -> &RecordLocation
Get line number
fn column(&self) -> u32
Get error column
fn file(&self) -> &'static str
Get file path
fn tag(&self) -> &str
Get tag
Tag is information that can be attached to Record
that is not meant
to be part of the data, but only as an ad-hoc control flag
for quick lookup in the Drain
s. As such should be used
carefully and mostly in application code (as opposed to libraries) -
where tag used acros the system can be coordinated.
fn module(&self) -> &'static str
Get module
fn function(&self) -> &'static str
Get function
fn kv(&self) -> BorrowedKV
Get key-value pairs