Struct gelf::Message [] [src]

pub struct Message<'a> { /* fields omitted */ }

Message is thre representation of a GELF message.

Message provides a fluid setter and getter interface to all of GELF's features. Only the host-field is not available. It is managed the Logger.

A Message can also be constructed from a log::LogRecord. All available metadata is transferred over to the message object.

Methods

impl<'a> Message<'a>
[src]

Construct a new log message.

All fields will use their defaults. This means usually Option::None. A notable exception is level. The GELF spec requires this field to default to Level::Alert.

Construct a new log message with a defined level

All fields will use their defaults. This means usually Option::None.

Return the short_message

Set the short_message

Return the full_message

Set the full_message

Return the timestamp

Set the timestamp

Clear the timestamp

Return the level

Set the level

Return a metadata field with given key

Return all metadata

Set a metadata field with given key to value

Trait Implementations

impl<'a> From<&'a LogRecord<'a>> for Message<'a>
[src]

Create a Message from given log::LogRecord including all metadata