From d73efd36b71a0ed00e64ac772767de45c50c4058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Wo=CC=81jcik?= <3044353+pwojcikdev@users.noreply.github.com> Date: Mon, 5 Aug 2024 22:45:06 +0200 Subject: [PATCH] Fix logging --- nano/node/cli.cpp | 2 ++ nano/secure/ledger.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nano/node/cli.cpp b/nano/node/cli.cpp index 1d07d8681b..412c3367cd 100644 --- a/nano/node/cli.cpp +++ b/nano/node/cli.cpp @@ -482,6 +482,8 @@ std::error_code nano::handle_node_options (boost::program_options::variables_map } else if (vm.count ("migrate_database_lmdb_to_rocksdb")) { + nano::logger::initialize (nano::log_config::daemon_default (), data_path); + auto data_path = vm.count ("data_path") ? std::filesystem::path (vm["data_path"].as ()) : nano::working_path (); auto node_flags = nano::inactive_node_flag_defaults (); node_flags.config_overrides.push_back ("node.rocksdb.enable=false"); diff --git a/nano/secure/ledger.cpp b/nano/secure/ledger.cpp index 73a3ab7170..52f819924d 100644 --- a/nano/secure/ledger.cpp +++ b/nano/secure/ledger.cpp @@ -1242,7 +1242,6 @@ uint64_t nano::ledger::pruning_action (secure::write_transaction & transaction_a bool nano::ledger::migrate_lmdb_to_rocksdb (std::filesystem::path const & data_path_a) const { nano::logger logger; - nano::logger::initialize (nano::log_config::daemon_default (), data_path_a); logger.info (nano::log::type::ledger, "Migrating LMDB database to RocksDB. This will take a while...");