pub trait LogStorage {
// Required methods
fn pop_logs(&self) -> Vec<Value>;
fn get_log_by_id(&self, id: &str) -> Option<Value>;
fn get_log_ids(&self) -> Vec<String>;
fn get_logs_by_tag(&self, tag: &str) -> Vec<Value>;
fn get_logs_by_request_id(&self, request_id: &str) -> Vec<Value>;
fn get_logs_by_request_id_and_tag(
&self,
request_id: &str,
tag: &str,
) -> Vec<Value>;
}Expand description
Log Storage interface for getting log entries from the storage
Required Methods§
Sourcefn get_log_by_id(&self, id: &str) -> Option<Value>
fn get_log_by_id(&self, id: &str) -> Option<Value>
Get specific log entry
Sourcefn get_log_ids(&self) -> Vec<String>
fn get_log_ids(&self) -> Vec<String>
Returns a list of all log ids
Sourcefn get_logs_by_tag(&self, tag: &str) -> Vec<Value>
fn get_logs_by_tag(&self, tag: &str) -> Vec<Value>
Get logs by tag, like log_kind or log level.
Tag can be log_kind, log_level.
Sourcefn get_logs_by_request_id(&self, request_id: &str) -> Vec<Value>
fn get_logs_by_request_id(&self, request_id: &str) -> Vec<Value>
Get logs by request_id.
Return log entries that match the given request_id.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".