log: [refactor] Use info level for init logs

This refactor does not change behavior.
This commit is contained in:
MarcoFalke
2025-07-25 09:52:43 +02:00
parent fa183761cb
commit face8123fd
27 changed files with 106 additions and 102 deletions

View File

@@ -228,12 +228,12 @@ CDBWrapper::CDBWrapper(const DBParams& params)
DBContext().options.env = DBContext().penv;
} else {
if (params.wipe_data) {
LogPrintf("Wiping LevelDB in %s\n", fs::PathToString(params.path));
LogInfo("Wiping LevelDB in %s", fs::PathToString(params.path));
leveldb::Status result = leveldb::DestroyDB(fs::PathToString(params.path), DBContext().options);
HandleError(result);
}
TryCreateDirectories(params.path);
LogPrintf("Opening LevelDB in %s\n", fs::PathToString(params.path));
LogInfo("Opening LevelDB in %s", fs::PathToString(params.path));
}
// PathToString() return value is safe to pass to leveldb open function,
// because on POSIX leveldb passes the byte string directly to ::open(), and
@@ -241,12 +241,12 @@ CDBWrapper::CDBWrapper(const DBParams& params)
// (see env_posix.cc and env_windows.cc).
leveldb::Status status = leveldb::DB::Open(DBContext().options, fs::PathToString(params.path), &DBContext().pdb);
HandleError(status);
LogPrintf("Opened LevelDB successfully\n");
LogInfo("Opened LevelDB successfully");
if (params.options.force_compact) {
LogPrintf("Starting database compaction of %s\n", fs::PathToString(params.path));
LogInfo("Starting database compaction of %s", fs::PathToString(params.path));
DBContext().pdb->CompactRange(nullptr, nullptr);
LogPrintf("Finished database compaction of %s\n", fs::PathToString(params.path));
LogInfo("Finished database compaction of %s", fs::PathToString(params.path));
}
assert(!m_obfuscation); // Needed for unobfuscated Read()/Write() below