fix: pass RUST_LOG down to tycho-indexer

This commit is contained in:
adrian
2025-09-12 08:59:48 +02:00
committed by Adrian Benavides
parent 2a0af6c733
commit 2ea296fb8b
2 changed files with 7 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ services:
db:
condition: service_healthy
environment:
RUST_LOG: "info"
RUST_LOG: "protocol_testing=info"
DATABASE_URL: postgres://postgres:mypassword@db:5432/tycho_indexer_0
RPC_URL: "${RPC_URL}"
SUBSTREAMS_API_TOKEN: "${SUBSTREAMS_API_TOKEN}"

View File

@@ -37,7 +37,7 @@ impl TychoRunner {
dotenv().ok();
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();
@@ -113,13 +113,14 @@ impl TychoRunner {
// Start the RPC server in a separate thread
let rpc_thread = thread::spawn(move || {
let binary_path = "tycho-indexer";
let mut cmd = Command::new(binary_path)
let mut cmd = Command::new("tycho-indexer")
.args(["--database-url", db_url.as_str(), "rpc"])
.stdout(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()
.expect("Failed to start RPC server");