MakeBody

Trait MakeBody 

Source
pub trait MakeBody:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn create(
        &self,
        record: &Record<'_>,
        diags: &[Box<dyn Diagnostic>],
    ) -> Result<AnyValue, Error>;
}
Expand description

A trait for formatting log records into a body that can be sent to OpenTelemetry.

Required Methods§

Source

fn create( &self, record: &Record<'_>, diags: &[Box<dyn Diagnostic>], ) -> Result<AnyValue, Error>

Creates a log record with optional diagnostics.

Trait Implementations§

Source§

impl<T: MakeBody> From<T> for Box<dyn MakeBody>

Source§

fn from(value: T) -> Self

Converts to this type from the input type.

Implementors§