Skip to content

Commit

Permalink
style(aggregator): reduce some logs space
Browse files Browse the repository at this point in the history
  • Loading branch information
Alenar committed Oct 14, 2024
1 parent d2a471e commit 80a4792
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 16 deletions.
3 changes: 1 addition & 2 deletions mithril-aggregator/src/runtime/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ impl CertifierService for BufferedCertifierService {
Err(error) => match error.downcast_ref::<CertifierServiceError>() {
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
);
Expand Down
3 changes: 1 addition & 2 deletions mithril-aggregator/src/services/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ impl<S: MKTreeStorer> ProverService for MithrilProverService<S> {
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
Expand Down
4 changes: 2 additions & 2 deletions mithril-aggregator/src/snapshotter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down
4 changes: 2 additions & 2 deletions mithril-aggregator/src/tools/signer_importer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 80a4792

Please sign in to comment.