Skip to content

Commit 9a466fe

Browse files
committed
Cleaning up some log messages
1 parent b50b4f0 commit 9a466fe

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

sim-lib/src/lib.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl NodeId {
5050
crate::NodeId::PublicKey(pk) => {
5151
if pk != node_id {
5252
return Err(LightningError::ValidationError(format!(
53-
"the provided node id does not match the one returned by the backend ({} != {}).",
53+
"The provided node id does not match the one returned by the backend ({} != {}).",
5454
pk, node_id
5555
)));
5656
}
@@ -655,7 +655,7 @@ impl Simulation {
655655
// csr: consume simulation results
656656
let csr_write_results = self.write_results.clone();
657657
tasks.spawn(async move {
658-
log::debug!("Staring simulation results consumer.");
658+
log::debug!("Starting simulation results consumer.");
659659
if let Err(e) = consume_simulation_results(
660660
result_logger,
661661
results_receiver,
@@ -795,9 +795,9 @@ impl Simulation {
795795
consume_events(ce_node, receiver, ce_output_sender, ce_listener).await
796796
{
797797
ce_shutdown.trigger();
798-
log::error!("Event consumer exited with error: {e:?}.");
798+
log::error!("Event consumer for node {node_info} exited with error: {e:?}.");
799799
} else {
800-
log::debug!("Event consumer for node {node_info} received shutdown signal.");
800+
log::debug!("Event consumer for node {node_info} completed successfully.");
801801
}
802802
});
803803
}
@@ -844,9 +844,9 @@ impl Simulation {
844844
.await
845845
{
846846
pe_shutdown.trigger();
847-
log::debug!("Event producer exited with error {e}.");
847+
log::debug!("Activity producer for {source} exited with error {e}.");
848848
} else {
849-
log::debug!("Random activity generator for {source} received shutdown signal.");
849+
log::debug!("Activity producer for {source} completed successfully.");
850850
}
851851
});
852852
}
@@ -940,7 +940,7 @@ async fn produce_events<N: DestinationGenerator + ?Sized, A: PaymentGenerator +
940940
loop {
941941
if let Some(c) = node_generator.payment_count() {
942942
if c == current_count {
943-
log::info!("Payment count has been met: {c} payments. Stopping the activity.");
943+
log::info!("Payment count has been met for {source}: {c} payments. Stopping the activity.");
944944
return Ok(());
945945
}
946946
}
@@ -979,12 +979,12 @@ async fn produce_events<N: DestinationGenerator + ?Sized, A: PaymentGenerator +
979979
},
980980
};
981981

982-
log::debug!("Generated random payment: {source} -> {}: {amount} msat.", destination);
982+
log::debug!("Generated payment: {source} -> {}: {amount} msat.", destination);
983983

984984
// Send the payment, exiting if we can no longer send to the consumer.
985985
let event = SimulationEvent::SendPayment(destination.clone(), amount);
986986
if sender.send(event.clone()).await.is_err() {
987-
return Err(SimulationError::MpscChannelError (format!("Stopped random producer for {amount}: {source} -> {destination}.")));
987+
return Err(SimulationError::MpscChannelError (format!("Stopped activity producer for {amount}: {source} -> {destination}.")));
988988
}
989989

990990
current_count += 1;

0 commit comments

Comments
 (0)