pub struct WorkflowLogger { /* private fields */ }Expand description
Workflow logger.
Implementations§
Source§impl WorkflowLogger
impl WorkflowLogger
Sourcepub fn with_config(max_logs_per_workflow: usize, min_level: LogLevel) -> Self
pub fn with_config(max_logs_per_workflow: usize, min_level: LogLevel) -> Self
Create a logger with custom configuration.
Sourcepub fn set_min_level(&mut self, level: LogLevel)
pub fn set_min_level(&mut self, level: LogLevel)
Set the minimum log level.
Sourcepub async fn trace<S1: Into<String>, S2: Into<String>>(
&self,
workflow_id: S1,
message: S2,
)
pub async fn trace<S1: Into<String>, S2: Into<String>>( &self, workflow_id: S1, message: S2, )
Log a trace message.
Sourcepub async fn debug<S1: Into<String>, S2: Into<String>>(
&self,
workflow_id: S1,
message: S2,
)
pub async fn debug<S1: Into<String>, S2: Into<String>>( &self, workflow_id: S1, message: S2, )
Log a debug message.
Sourcepub async fn info<S1: Into<String>, S2: Into<String>>(
&self,
workflow_id: S1,
message: S2,
)
pub async fn info<S1: Into<String>, S2: Into<String>>( &self, workflow_id: S1, message: S2, )
Log an info message.
Sourcepub async fn warn<S1: Into<String>, S2: Into<String>>(
&self,
workflow_id: S1,
message: S2,
)
pub async fn warn<S1: Into<String>, S2: Into<String>>( &self, workflow_id: S1, message: S2, )
Log a warning message.
Sourcepub async fn error<S1: Into<String>, S2: Into<String>>(
&self,
workflow_id: S1,
message: S2,
)
pub async fn error<S1: Into<String>, S2: Into<String>>( &self, workflow_id: S1, message: S2, )
Log an error message.
Sourcepub async fn fatal<S1: Into<String>, S2: Into<String>>(
&self,
workflow_id: S1,
message: S2,
)
pub async fn fatal<S1: Into<String>, S2: Into<String>>( &self, workflow_id: S1, message: S2, )
Log a fatal message.
Sourcepub async fn get_logs_filtered(
&self,
workflow_id: &str,
min_level: LogLevel,
limit: Option<usize>,
) -> Vec<LogEntry>
pub async fn get_logs_filtered( &self, workflow_id: &str, min_level: LogLevel, limit: Option<usize>, ) -> Vec<LogEntry>
Get logs for a workflow with filtering.
Sourcepub async fn get_task_logs(
&self,
workflow_id: &str,
task_id: &str,
) -> Vec<LogEntry>
pub async fn get_task_logs( &self, workflow_id: &str, task_id: &str, ) -> Vec<LogEntry>
Get logs for a specific task.
Sourcepub async fn clear_logs(&self, workflow_id: &str)
pub async fn clear_logs(&self, workflow_id: &str)
Clear logs for a workflow.
Sourcepub fn clear_all_logs(&self)
pub fn clear_all_logs(&self)
Clear all logs.
Sourcepub async fn get_log_count(&self, workflow_id: &str) -> usize
pub async fn get_log_count(&self, workflow_id: &str) -> usize
Get log count for a workflow.
Sourcepub async fn get_total_log_count(&self) -> usize
pub async fn get_total_log_count(&self) -> usize
Get total log count across all workflows.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkflowLogger
impl !RefUnwindSafe for WorkflowLogger
impl Send for WorkflowLogger
impl Sync for WorkflowLogger
impl Unpin for WorkflowLogger
impl UnsafeUnpin for WorkflowLogger
impl !UnwindSafe for WorkflowLogger
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
Mutably borrows from an owned value. Read more