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]

[src]

Get a log record message

[src]

Get record logging level

[src]

Get line number

[src]

Get line number

[src]

Get error column

[src]

Get file path

[src]

Get tag

Tag is information that can be attached to Record that is not meant to be part of the norma key-value pairs, but only as an ad-hoc control flag for quick lookup in the Drains. As such should be used carefully and mostly in application code (as opposed to libraries) - where tag meaning across the system can be coordinated. When used in libraries, make sure to prefix is with something reasonably distinct, like create name.

[src]

Get module

[src]

Get function (placeholder)

There's currently no way to obtain that information in Rust at compile time, so it is not implemented.

It will be implemented at first opportunity, and it will not be considered a breaking change.

[src]

Get key-value pairs