lib: Add exclude query debug output
authorAustin Clements <amdragon@MIT.EDU>
Wed, 14 Mar 2012 02:31:31 +0000 (22:31 -0400)
committerDavid Bremner <bremner@debian.org>
Sun, 18 Mar 2012 12:14:22 +0000 (09:14 -0300)
lib/query.cc

index 1e5e99a52bd08f06cfd223c55bf857f78a575f19..53d505a557ba83e81d6e8effd5641b23bbcfccec 100644 (file)
@@ -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);