fix: pass RUST_LOG down to tycho-indexer
This commit is contained in:
@@ -28,7 +28,7 @@ services:
|
|||||||
db:
|
db:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
RUST_LOG: "info"
|
RUST_LOG: "protocol_testing=info"
|
||||||
DATABASE_URL: postgres://postgres:mypassword@db:5432/tycho_indexer_0
|
DATABASE_URL: postgres://postgres:mypassword@db:5432/tycho_indexer_0
|
||||||
RPC_URL: "${RPC_URL}"
|
RPC_URL: "${RPC_URL}"
|
||||||
SUBSTREAMS_API_TOKEN: "${SUBSTREAMS_API_TOKEN}"
|
SUBSTREAMS_API_TOKEN: "${SUBSTREAMS_API_TOKEN}"
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ impl TychoRunner {
|
|||||||
dotenv().ok();
|
dotenv().ok();
|
||||||
|
|
||||||
let mut cmd = Command::new("tycho-indexer");
|
let mut cmd = Command::new("tycho-indexer");
|
||||||
cmd.env("RUST_LOG", "tycho_indexer=info");
|
cmd.env("RUST_LOG", std::env::var("RUST_LOG").unwrap_or("tycho_indexer=info".to_string()));
|
||||||
|
|
||||||
let all_accounts = self.initialized_accounts.clone();
|
let all_accounts = self.initialized_accounts.clone();
|
||||||
|
|
||||||
@@ -113,13 +113,14 @@ impl TychoRunner {
|
|||||||
|
|
||||||
// Start the RPC server in a separate thread
|
// Start the RPC server in a separate thread
|
||||||
let rpc_thread = thread::spawn(move || {
|
let rpc_thread = thread::spawn(move || {
|
||||||
let binary_path = "tycho-indexer";
|
let mut cmd = Command::new("tycho-indexer")
|
||||||
|
|
||||||
let mut cmd = Command::new(binary_path)
|
|
||||||
.args(["--database-url", db_url.as_str(), "rpc"])
|
.args(["--database-url", db_url.as_str(), "rpc"])
|
||||||
.stdout(Stdio::piped())
|
.stdout(Stdio::piped())
|
||||||
.stderr(Stdio::piped())
|
.stderr(Stdio::piped())
|
||||||
.env("RUST_LOG", "info")
|
.env(
|
||||||
|
"RUST_LOG",
|
||||||
|
std::env::var("RUST_LOG").unwrap_or("tycho_indexer=info".to_string()),
|
||||||
|
)
|
||||||
.spawn()
|
.spawn()
|
||||||
.expect("Failed to start RPC server");
|
.expect("Failed to start RPC server");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user