From 80a479201124bc5f79114663947777c723d683fc Mon Sep 17 00:00:00 2001 From: DJO <790521+Alenar@users.noreply.github.com> Date: Mon, 14 Oct 2024 18:07:15 +0200 Subject: [PATCH] style(aggregator): reduce some logs space --- mithril-aggregator/src/runtime/runner.rs | 3 +-- .../src/services/certifier/buffered_certifier.rs | 3 +-- mithril-aggregator/src/services/prover.rs | 3 +-- mithril-aggregator/src/snapshotter.rs | 4 ++-- mithril-aggregator/src/tools/signer_importer.rs | 4 ++-- .../src/tools/single_signature_authenticator.rs | 9 +++------ 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/mithril-aggregator/src/runtime/runner.rs b/mithril-aggregator/src/runtime/runner.rs index de295ea48f..0ecd3bc778 100644 --- a/mithril-aggregator/src/runtime/runner.rs +++ b/mithril-aggregator/src/runtime/runner.rs @@ -438,8 +438,7 @@ impl AggregatorRunnerTrait for AggregatorRunner { .change_era(current_era, token.get_current_epoch()); debug!( self.logger, - "Current Era is {} (Epoch {}).", - current_era, + "Current Era is {current_era} (Epoch {}).", token.get_current_epoch() ); diff --git a/mithril-aggregator/src/services/certifier/buffered_certifier.rs b/mithril-aggregator/src/services/certifier/buffered_certifier.rs index 9c8cf1025e..8de968243d 100644 --- a/mithril-aggregator/src/services/certifier/buffered_certifier.rs +++ b/mithril-aggregator/src/services/certifier/buffered_certifier.rs @@ -102,8 +102,7 @@ impl CertifierService for BufferedCertifierService { Err(error) => match error.downcast_ref::() { Some(CertifierServiceError::NotFound(..)) if signature.is_authenticated() => { debug!( - self.logger, - "No OpenMessage available for signed entity - Buffering single signature"; + self.logger, "No OpenMessage available for signed entity - Buffering single signature"; "signed_entity_type" => ?signed_entity_type, "party_id" => &signature.party_id ); diff --git a/mithril-aggregator/src/services/prover.rs b/mithril-aggregator/src/services/prover.rs index ec13ee1348..444c09b63a 100644 --- a/mithril-aggregator/src/services/prover.rs +++ b/mithril-aggregator/src/services/prover.rs @@ -167,8 +167,7 @@ impl ProverService for MithrilProverService { async fn compute_cache(&self, up_to: BlockNumber) -> StdResult<()> { let pool_size = self.mk_map_pool.size(); info!( - self.logger, - "Starts computing the Merkle map pool resource of size {pool_size}"; + self.logger, "Starts computing the Merkle map pool resource of size {pool_size}"; "up_to_block_number" => *up_to, ); let mk_map_cache = self diff --git a/mithril-aggregator/src/snapshotter.rs b/mithril-aggregator/src/snapshotter.rs index 52168de1cd..ac4ba0b294 100644 --- a/mithril-aggregator/src/snapshotter.rs +++ b/mithril-aggregator/src/snapshotter.rs @@ -101,8 +101,8 @@ impl Snapshotter for CompressedArchiveSnapshotter { let filesize = self.create_and_verify_archive(&archive_path).inspect_err(|_err| { if archive_path.exists() { if let Err(remove_error) = fs::remove_file(&archive_path) { - warn!(self.logger, - " > Post snapshotter.snapshot failure, could not remove temporary archive"; + warn!( + self.logger, " > Post snapshotter.snapshot failure, could not remove temporary archive"; "archive_path" => archive_path.display(), "error" => remove_error ); diff --git a/mithril-aggregator/src/tools/signer_importer.rs b/mithril-aggregator/src/tools/signer_importer.rs index 15453a3ae7..6c6e1fe806 100644 --- a/mithril-aggregator/src/tools/signer_importer.rs +++ b/mithril-aggregator/src/tools/signer_importer.rs @@ -45,8 +45,8 @@ impl SignersImporter { .await .with_context(|| "Failed to retrieve signers from remote service")?; - info!(self.logger, - "Persisting retrieved data in the database"; + info!( + self.logger, "Persisting retrieved data in the database"; "number_of_signer_to_insert" => items.len() ); self.persister diff --git a/mithril-aggregator/src/tools/single_signature_authenticator.rs b/mithril-aggregator/src/tools/single_signature_authenticator.rs index 80a5c64f07..f7cd8b7123 100644 --- a/mithril-aggregator/src/tools/single_signature_authenticator.rs +++ b/mithril-aggregator/src/tools/single_signature_authenticator.rs @@ -35,8 +35,7 @@ impl SingleSignatureAuthenticator { { Ok(()) => { debug!( - self.logger, - "Single signature party authenticated for current stake distribution"; + self.logger, "Single signature party authenticated for current stake distribution"; "party_id" => &single_signature.party_id, ); true @@ -54,15 +53,13 @@ impl SingleSignatureAuthenticator { .is_ok() { debug!( - self.logger, - "Single signature party authenticated for next stake distribution"; + self.logger, "Single signature party authenticated for next stake distribution"; "party_id" => &single_signature.party_id, ); true } else { debug!( - self.logger, - "Single signature party not authenticated"; + self.logger, "Single signature party not authenticated"; "party_id" => &single_signature.party_id, ); false