Skip to content

Commit 07d020c

Browse files
authored
Merge pull request #311 from tnull/2024-06-log-node-id-on-startup
Log node ID in `start`/`stop`
2 parents 4201760 + 41a7955 commit 07d020c

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,12 @@ impl Node {
217217
return Err(Error::AlreadyRunning);
218218
}
219219

220-
log_info!(self.logger, "Starting up LDK Node on network: {}", self.config.network);
220+
log_info!(
221+
self.logger,
222+
"Starting up LDK Node with node ID {} on network: {}",
223+
self.node_id(),
224+
self.config.network
225+
);
221226

222227
let runtime = tokio::runtime::Builder::new_multi_thread().enable_all().build().unwrap();
223228

@@ -728,7 +733,7 @@ impl Node {
728733
pub fn stop(&self) -> Result<(), Error> {
729734
let runtime = self.runtime.write().unwrap().take().ok_or(Error::NotRunning)?;
730735

731-
log_info!(self.logger, "Shutting down LDK Node...");
736+
log_info!(self.logger, "Shutting down LDK Node with node ID {}...", self.node_id());
732737

733738
// Stop the runtime.
734739
match self.stop_sender.send(()) {

0 commit comments

Comments
 (0)