From 74b2cc5e698d263a88483a242c09065640a40f91 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Sun, 24 Jan 2010 00:50:23 +0200 Subject: [PATCH] * mu-util-xapian: do extra logging, small updates --- src/mu-util-xapian.cc | 6 ++++++ src/mu-util-xapian.h | 4 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mu-util-xapian.cc b/src/mu-util-xapian.cc index 306a12eb..dc30a484 100644 --- a/src/mu-util-xapian.cc +++ b/src/mu-util-xapian.cc @@ -42,6 +42,10 @@ mu_util_xapian_db_version (const gchar *xpath) Xapian::Database db (xpath); const std::string version (db.get_metadata (MU_XAPIAN_VERSION_KEY)); + + MU_WRITE_LOG ("database version: '%s', expected '%s'", + version.empty() ? "" : version.c_str(), + MU_XAPIAN_DB_VERSION); return version.empty() ? NULL : g_strdup (version.c_str()); @@ -80,6 +84,8 @@ mu_util_xapian_clear_database (const gchar *xpath) (xpath, Xapian::DB_CREATE_OR_OVERWRITE); db.flush (); + MU_WRITE_LOG ("emptied database %s", xpath); + return TRUE; } MU_XAPIAN_CATCH_BLOCK; diff --git a/src/mu-util-xapian.h b/src/mu-util-xapian.h index 67066fdc..7fda1e7e 100644 --- a/src/mu-util-xapian.h +++ b/src/mu-util-xapian.h @@ -35,7 +35,7 @@ G_BEGIN_DECLS * @return the version of the database as a newly allocated string * (free with g_free); if there is no version yet, it will return NULL */ -char* mu_util_xapian_db_version (const gchar *xpath); +gchar* mu_util_xapian_db_version (const gchar *xpath) G_GNUC_WARN_UNUSED_RESULT; /** @@ -47,8 +47,6 @@ char* mu_util_xapian_db_version (const gchar *xpath); */ gboolean mu_util_xapian_db_version_up_to_date (const gchar *xpath); - - /** * clear the database, ie., remove all of the contents. This is a * destructive operation, but the database can be restored be doing a