Skip to content

Commit 64e9dc5

Browse files
authored
fix(common): replace log with tracing (#88)
Previously, all logs emitted from the common package would not appear.
1 parent b595cda commit 64e9dc5

File tree

10 files changed

+10
-10
lines changed

10 files changed

+10
-10
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

common/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ eventuals = "0.6.7"
1414
faux = { version = "0.1.10", optional = true }
1515
keccak-hash = "0.10.0"
1616
lazy_static = "1.4.0"
17-
log = "0.4.20"
1817
lru = "0.11.1"
1918
once_cell = "1.17"
2019
prometheus = "0.13.3"
@@ -34,6 +33,7 @@ tokio = { version = "1.32.0", features = ["full", "macros", "rt"] }
3433
toolshed = { git = "https://github.com/edgeandnode/toolshed", branch = "main", features = [
3534
"graphql",
3635
] }
36+
tracing = "0.1.34"
3737
graphql = { git = "https://github.com/edgeandnode/toolshed", branch = "main" }
3838
tap_core = "0.6.0"
3939

common/src/allocations/monitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use std::{collections::HashMap, time::Duration};
66
use alloy_primitives::Address;
77
use anyhow::anyhow;
88
use eventuals::{timer, Eventual, EventualExt};
9-
use log::warn;
109
use serde::Deserialize;
1110
use serde_json::json;
1211
use tokio::time::sleep;
12+
use tracing::warn;
1313

1414
use crate::prelude::SubgraphClient;
1515

common/src/attestations/dispute_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ use std::time::Duration;
55

66
use alloy_primitives::Address;
77
use eventuals::{timer, Eventual, EventualExt};
8-
use log::warn;
98
use serde::Deserialize;
109
use serde_json::json;
1110
use tokio::time::sleep;
11+
use tracing::warn;
1212

1313
use crate::subgraph_client::SubgraphClient;
1414

common/src/attestations/signers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
use alloy_primitives::Address;
55
use ethers_core::types::U256;
66
use eventuals::{join, Eventual, EventualExt};
7-
use log::warn;
87
use std::collections::HashMap;
98
use std::sync::Arc;
109
use tokio::sync::Mutex;
10+
use tracing::warn;
1111

1212
use crate::prelude::{Allocation, AttestationSigner};
1313

common/src/escrow_accounts.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ use alloy_primitives::Address;
77
use anyhow::Result;
88
use ethers_core::types::U256;
99
use eventuals::{timer, Eventual, EventualExt};
10-
use log::{error, warn};
1110
use serde::Deserialize;
1211
use serde_json::json;
1312
use tokio::time::sleep;
13+
use tracing::{error, warn};
1414

1515
use crate::prelude::SubgraphClient;
1616

common/src/indexer_errors.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::{
66
fmt::{self, Display},
77
};
88

9-
use log::warn;
9+
use tracing::warn;
1010

1111
use crate::metrics;
1212

common/src/subgraph_client/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
use anyhow::anyhow;
55
use eventuals::Eventual;
66
use graphql::http::Response;
7-
use log::warn;
87
use reqwest::{header, Url};
98
use serde::de::Deserialize;
109
use serde_json::Value;
1110
use toolshed::thegraph::DeploymentId;
11+
use tracing::warn;
1212

1313
use super::monitor::{monitor_deployment_status, DeploymentStatus};
1414

common/src/subgraph_client/monitor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ use std::time::Duration;
55

66
use eventuals::{timer, Eventual, EventualExt};
77
use graphql::http::Response;
8-
use log::warn;
98
use reqwest::{header, Url};
109
use serde::Deserialize;
1110
use serde_json::{json, Value};
1211
use tokio::time::sleep;
1312
use toolshed::thegraph::DeploymentId;
13+
use tracing::warn;
1414

1515
#[derive(Deserialize)]
1616
#[serde(rename_all = "camelCase")]

common/src/tap_manager.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use alloy_sol_types::Eip712Domain;
66
use anyhow::anyhow;
77
use ethers_core::types::U256;
88
use eventuals::Eventual;
9-
use log::error;
109
use sqlx::{types::BigDecimal, PgPool};
1110
use std::{collections::HashMap, sync::Arc};
1211
use tap_core::tap_manager::SignedReceipt;
12+
use tracing::error;
1313

1414
use crate::prelude::Allocation;
1515

0 commit comments

Comments
 (0)