From 178a06459121020feb116afe29cc9c3e527a7980 Mon Sep 17 00:00:00 2001 From: grumbach Date: Wed, 8 Jan 2025 02:36:16 +0900 Subject: [PATCH] fix: enable feature gated logging option --- ant-cli/src/evm_network.rs | 6 ++++-- ant-node/Cargo.toml | 5 ++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ant-cli/src/evm_network.rs b/ant-cli/src/evm_network.rs index 48998f1c0f..34e09ecc0f 100644 --- a/ant-cli/src/evm_network.rs +++ b/ant-cli/src/evm_network.rs @@ -1,5 +1,5 @@ use autonomi::{get_evm_network_from_env, local_evm_network_from_csv, Network}; -use color_eyre::eyre::Result; +use color_eyre::eyre::{Context, Result}; use std::sync::OnceLock; @@ -12,7 +12,9 @@ pub(crate) fn get_evm_network(local: bool) -> Result { let res = match get_evm_network_from_env() { Ok(evm_network) => Ok(evm_network), - Err(_) if local => Ok(local_evm_network_from_csv()?), + Err(_) if local => { + Ok(local_evm_network_from_csv().wrap_err("Failed to get local EVM network")?) + } Err(_) => Ok(Default::default()), }; diff --git a/ant-node/Cargo.toml b/ant-node/Cargo.toml index d2c73991dd..5ca35b65ca 100644 --- a/ant-node/Cargo.toml +++ b/ant-node/Cargo.toml @@ -14,10 +14,9 @@ name = "antnode" path = "src/bin/antnode/main.rs" [features] -default = ["metrics", "upnp", "open-metrics"] +default = ["upnp", "open-metrics"] extension-module = ["pyo3/extension-module"] loud = ["ant-networking/loud"] # loud mode: print important messages to console -metrics = [] nightly = [] open-metrics = ["ant-networking/open-metrics", "prometheus-client"] otlp = ["ant-logging/otlp"] @@ -27,7 +26,7 @@ upnp = ["ant-networking/upnp"] ant-bootstrap = { path = "../ant-bootstrap", version = "0.1.2" } ant-build-info = { path = "../ant-build-info", version = "0.1.22" } ant-evm = { path = "../ant-evm", version = "0.1.7" } -ant-logging = { path = "../ant-logging", version = "0.2.43" } +ant-logging = { path = "../ant-logging", version = "0.2.43", features = ["process-metrics"] } ant-networking = { path = "../ant-networking", version = "0.3.2" } ant-protocol = { path = "../ant-protocol", version = "0.3.2" } ant-registers = { path = "../ant-registers", version = "0.4.6" }