diff --git a/src/storage/backend/sqlite/SQLite.cc b/src/storage/backend/sqlite/SQLite.cc index d0773530ef..c421a532ce 100644 --- a/src/storage/backend/sqlite/SQLite.cc +++ b/src/storage/backend/sqlite/SQLite.cc @@ -22,7 +22,7 @@ OperationResult SQLite::RunPragma(std::string_view name, std::optionalempty() ) cmd += util::fmt(" = %.*s", static_cast(value->size()), value->data()); - DBG_LOG(DBG_STORAGE, "Executing pragma %s on %s", cmd.c_str(), full_path.c_str()); + DBG_LOG(DBG_STORAGE, "Executing '%s' on %s", cmd.c_str(), full_path.c_str()); while ( pragma_timeout == 0ms || time_spent < pragma_timeout ) { int res = sqlite3_exec(db, cmd.c_str(), NULL, NULL, &errorMsg); @@ -37,18 +37,21 @@ OperationResult SQLite::RunPragma(std::string_view name, std::optional= pragma_timeout ) { - std::string err = - util::fmt("Database was busy while executing %.*s pragma", static_cast(name.size()), name.data()); + std::string err = util::fmt("Database was busy while executing '%s'", cmd.c_str()); + DBG_LOG(DBG_STORAGE, "%s", err.c_str()); return {ReturnCode::INITIALIZATION_FAILED, std::move(err)}; } + DBG_LOG(DBG_STORAGE, "'%s' successful", cmd.c_str()); + return {ReturnCode::SUCCESS}; }