pub trait WithLogger {
// Provided methods
fn logger_name(&self) -> &str { ... }
fn log_info(&self, msg: &str) { ... }
fn log_debug(&self, msg: &str) { ... }
fn log_warning(&self, msg: &str) { ... }
fn log_error(&self, msg: &str) { ... }
}Expand description
Trait for types that can have logging capabilities
This trait provides a standard way to add logging to any type.
It’s the Rust equivalent of Python’s WithLogger mixin class.
§Examples
use composio_sdk::logging::WithLogger;
struct MyService {
logger_name: String,
}
impl WithLogger for MyService {
fn logger_name(&self) -> &str {
&self.logger_name
}
}Provided Methods§
Sourcefn logger_name(&self) -> &str
fn logger_name(&self) -> &str
Get the logger name for this type
Sourcefn log_warning(&self, msg: &str)
fn log_warning(&self, msg: &str)
Log a warning message (no truncation for warnings)