Skip to main content

Logger

Trait Logger 

Source
pub trait Logger:
    Sealed
    + Send
    + Sync {
    // Required methods
    fn debug(&self, message: &str, info: &LogInfo);
    fn info(&self, message: &str, info: &LogInfo);
    fn warn(&self, message: &str, info: &LogInfo);
    fn error(&self, message: &str, info: &LogInfo);
}
Expand description

Logger trait for structured logging in durable executions.

This trait is compatible with the tracing crate and allows custom logging implementations.

§Sealed Trait

This trait is sealed and cannot be implemented outside of this crate. This allows the SDK maintainers to evolve the logging interface without breaking external code. If you need custom logging behavior, use the provided factory functions or wrap one of the existing implementations.

Required Methods§

Source

fn debug(&self, message: &str, info: &LogInfo)

Logs a debug message.

Source

fn info(&self, message: &str, info: &LogInfo)

Logs an info message.

Source

fn warn(&self, message: &str, info: &LogInfo)

Logs a warning message.

Source

fn error(&self, message: &str, info: &LogInfo)

Logs an error message.

Implementors§

Source§

impl Logger for StructuredJsonLogger

Source§

impl Logger for ReplayAwareLogger

Source§

impl Logger for TracingLogger

Source§

impl<D, I, W, E> Logger for CustomLogger<D, I, W, E>
where D: Fn(&str, &LogInfo) + Send + Sync, I: Fn(&str, &LogInfo) + Send + Sync, W: Fn(&str, &LogInfo) + Send + Sync, E: Fn(&str, &LogInfo) + Send + Sync,