Skip to content

Commit 54a39cb

Browse files
committed
Add the date when the node was started to the name of the logfile. This makes it easier to delete old logs
1 parent 427e74c commit 54a39cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ impl Builder {
384384
fs::create_dir_all(bdk_data_dir.clone()).expect("Failed to create BDK data directory");
385385

386386
// Initialize the Logger
387-
let log_file_path = format!("{}/ldk_node.log", config.storage_dir_path);
387+
let log_file_path = format!("{}/ldk_node_{}.log", config.storage_dir_path, chrono::offset::Local::now().format("%Y_%m_%d"));
388388
let logger = Arc::new(FilesystemLogger::new(log_file_path, config.log_level));
389389

390390
// Initialize the on-chain wallet and chain access

0 commit comments

Comments
 (0)