pub struct LogInfo {
pub durable_execution_arn: Option<String>,
pub operation_id: Option<String>,
pub parent_id: Option<String>,
pub is_replay: bool,
pub extra: Vec<(String, String)>,
}Expand description
Context information for log messages.
This struct provides context for log messages including execution ARN,
operation IDs, and replay status. The is_replay flag indicates whether
the current operation is being replayed from a checkpoint.
Fields§
§durable_execution_arn: Option<String>The durable execution ARN
operation_id: Option<String>The current operation ID
parent_id: Option<String>The parent operation ID
is_replay: boolWhether the current operation is being replayed from a checkpoint
When true, the operation is returning a previously checkpointed result
without re-executing the operation’s logic. Loggers can use this flag
to suppress or annotate logs during replay.
extra: Vec<(String, String)>Additional key-value pairs
Implementations§
Source§impl LogInfo
impl LogInfo
Sourcepub fn new(durable_execution_arn: impl Into<String>) -> Self
pub fn new(durable_execution_arn: impl Into<String>) -> Self
Creates a new LogInfo with the given execution ARN.
Sourcepub fn with_operation_id(self, operation_id: impl Into<String>) -> Self
pub fn with_operation_id(self, operation_id: impl Into<String>) -> Self
Sets the operation ID.
Sourcepub fn with_parent_id(self, parent_id: impl Into<String>) -> Self
pub fn with_parent_id(self, parent_id: impl Into<String>) -> Self
Sets the parent ID.
Sourcepub fn with_replay(self, is_replay: bool) -> Self
pub fn with_replay(self, is_replay: bool) -> Self
Sets the replay flag.
When set to true, indicates that the current operation is being
replayed from a checkpoint rather than executing fresh.
§Arguments
is_replay- Whether the operation is being replayed
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LogInfo
impl RefUnwindSafe for LogInfo
impl Send for LogInfo
impl Sync for LogInfo
impl Unpin for LogInfo
impl UnsafeUnpin for LogInfo
impl UnwindSafe for LogInfo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more