Skip to main content

log_failover

Macro log_failover 

Source
macro_rules! log_failover {
    ( $from_endpoint:expr, $to_endpoint:expr, $reason:expr ) => { ... };
}
Expand description

Logs a failover event.

Records endpoint rotation details.

§Arguments

  • from_endpoint - Previous endpoint
  • to_endpoint - New endpoint
  • reason - Reason for failover

§Examples

use api_xai::log_failover;

log_failover!(
  "https://api.x.ai/v1/",
  "https://api-backup.x.ai/v1/",
  "Primary endpoint unhealthy"
);