Skip to content

Commit

Permalink
replace println with tracing
Browse files Browse the repository at this point in the history
  • Loading branch information
yuunlimm committed Jun 20, 2024
1 parent d300088 commit 6ff6ece
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ x = "run --package aptos-cargo-cli --bin aptos-cargo-cli --"
[build]
rustflags = ["--cfg", "tokio_unstable", "-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes"]

# TODO(grao): Figure out whether we should enable othaer cpu features, and whether we should use a different way to configure them rather than list every single one here.
# TODO(grao): Figure out whether we should enable other cpu features, and whether we should use a different way to configure them rather than list every single one here.
[target.x86_64-unknown-linux-gnu]
rustflags = ["--cfg", "tokio_unstable", "-C", "link-arg=-fuse-ld=lld", "-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes", "-C", "target-feature=+sse4.2"]

Expand Down
12 changes: 6 additions & 6 deletions ecosystem/indexer-grpc/indexer-grpc-data-service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,14 +148,14 @@ impl RunnableConfig for IndexerGrpcDataServiceConfig {
StorageFormat::Base64UncompressedProto
};

println!(
">>>> Starting Redis connection: {:?}",
&self.redis_read_replica_address.0
tracing::info!(
redis_connection_address = &self.redis_read_replica_address.0.to_string(),
"[data service] Starting Redis connection",
);
let redis_conn = redis::Client::open(self.redis_read_replica_address.0.clone())?
.get_tokio_connection_manager()
.await?;
println!(">>>> Redis connection established");
tracing::info!("[data service] Redis connection established");
// InMemoryCache.
let in_memory_cache =
aptos_indexer_grpc_utils::in_memory_cache::InMemoryCache::new_with_redis_connection(
Expand All @@ -164,7 +164,7 @@ impl RunnableConfig for IndexerGrpcDataServiceConfig {
cache_storage_format,
)
.await?;
println!(">>>> InMemoryCache established");
tracing::info!("[data service] InMemoryCache established");
// Add authentication interceptor.
let server = RawDataServerWrapper::new(
self.redis_read_replica_address.clone(),
Expand All @@ -181,7 +181,7 @@ impl RunnableConfig for IndexerGrpcDataServiceConfig {
.send_compressed(CompressionEncoding::Zstd)
.accept_compressed(CompressionEncoding::Zstd)
.accept_compressed(CompressionEncoding::Gzip);
println!(">>>> Starting gRPC server: {:?}", &svc);
tracing::info!("[data service] Starting gRPC server.");

let svc_clone = svc.clone();
let reflection_service_clone = reflection_service.clone();
Expand Down

0 comments on commit 6ff6ece

Please sign in to comment.