-
Notifications
You must be signed in to change notification settings - Fork 104
Open
Description
This is kind of like the inverse of ratelimiting. The idea here, is only if a codepath is triggered enough times in a given time window is the log fired.
Example from Oxy:
consecutive_failed_msg_write_attempts += 1;
match consecutive_failed_msg_write_attempts {
0..=2 => log::debug!(
"could not write log object to unix stream socket, will retry";
"socket_file" => unix_socket_path.clone(),
"task_name" => &task_name,
"error" => e.to_string(),
"consecutive_failures" => consecutive_failed_msg_write_attempts
),
3.. => log::warn!(
"could not write log object to unix stream socket, will retry";
"socket_file" => unix_socket_path.clone(),
"task_name" => &task_name,
"error" => e.to_string(),
"consecutive_failures" => consecutive_failed_msg_write_attempts
),
};Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels