[PATCH 2/2] lib: Add exclude query debug output

Austin Clements amdragon at MIT.EDU
Tue Mar 13 19:31:31 PDT 2012


---
 lib/query.cc |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lib/query.cc b/lib/query.cc
index 1e5e99a..53d505a 100644
--- a/lib/query.cc
+++ b/lib/query.cc
@@ -261,9 +261,12 @@ notmuch_query_search_messages (notmuch_query_t *query)
 	    break;
 	}
 
-	if (_debug_query ())
+	if (_debug_query ()) {
+	    fprintf (stderr, "Exclude query is:\n%s\n",
+		     exclude_query.get_description ().c_str ());
 	    fprintf (stderr, "Final query is:\n%s\n",
 		     final_query.get_description ().c_str ());
+	}
 
 	enquire.set_query (final_query);
 
@@ -537,9 +540,12 @@ notmuch_query_count_messages (notmuch_query_t *query)
 	enquire.set_weighting_scheme(Xapian::BoolWeight());
 	enquire.set_docid_order(Xapian::Enquire::ASCENDING);
 
-	if (_debug_query ())
+	if (_debug_query ()) {
+	    fprintf (stderr, "Exclude query is:\n%s\n",
+		     exclude_query.get_description ().c_str ());
 	    fprintf (stderr, "Final query is:\n%s\n",
 		     final_query.get_description ().c_str ());
+	}
 
 	enquire.set_query (final_query);
 
-- 
1.7.7.3



More information about the notmuch mailing list