mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-08 22:33:22 +00:00
replace log to tracing
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use tracing::warn;
|
||||
use tracing::{instrument, warn};
|
||||
|
||||
use crate::{
|
||||
disk::endpoint::{Endpoint, EndpointType},
|
||||
@@ -407,7 +407,7 @@ pub struct PoolEndpoints {
|
||||
pub platform: String,
|
||||
}
|
||||
|
||||
/// list of list of endpoints
|
||||
/// list of endpoints
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct EndpointServerPools(pub Vec<PoolEndpoints>);
|
||||
|
||||
@@ -532,6 +532,8 @@ impl EndpointServerPools {
|
||||
|
||||
nodes
|
||||
}
|
||||
|
||||
#[instrument]
|
||||
pub fn hosts_sorted(&self) -> Vec<Option<XHost>> {
|
||||
let (mut peers, local) = self.peers();
|
||||
|
||||
@@ -604,7 +606,6 @@ impl EndpointServerPools {
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
|
||||
use super::*;
|
||||
use std::path::Path;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ pub fn get_global_deployment_id() -> Option<String> {
|
||||
pub fn set_global_endpoints(eps: Vec<PoolEndpoints>) {
|
||||
GLOBAL_Endpoints
|
||||
.set(EndpointServerPools::from(eps))
|
||||
.expect("GLOBAL_Endpoints set faild")
|
||||
.expect("GLOBAL_Endpoints set failed")
|
||||
}
|
||||
|
||||
pub fn get_global_endpoints() -> EndpointServerPools {
|
||||
|
||||
Reference in New Issue
Block a user