1 Return-Path: <bremner@tesseract.cs.unb.ca>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by olra.theworths.org (Postfix) with ESMTP id B3F12431FC4
\r
6 for <notmuch@notmuchmail.org>; Sun, 28 Dec 2014 09:37:53 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id oFq2xBFWr5nl for <notmuch@notmuchmail.org>;
\r
16 Sun, 28 Dec 2014 09:37:50 -0800 (PST)
\r
17 Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155])
\r
18 (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 73754431FB6
\r
21 for <notmuch@notmuchmail.org>; Sun, 28 Dec 2014 09:37:50 -0800 (PST)
\r
22 Received: from remotemail by yantan.tethera.net with local (Exim 4.80)
\r
23 (envelope-from <bremner@tesseract.cs.unb.ca>) id 1Y5Hmk-0002fM-EV
\r
24 for notmuch@notmuchmail.org; Sun, 28 Dec 2014 13:37:46 -0400
\r
25 Received: (nullmailer pid 11491 invoked by uid 1000); Sun, 28 Dec 2014
\r
27 From: David Bremner <david@tethera.net>
\r
28 To: notmuch@notmuchmail.org
\r
29 Subject: libnotmuch logging overhaul v3
\r
30 Date: Sun, 28 Dec 2014 18:33:44 +0100
\r
31 Message-Id: <1419788030-10567-1-git-send-email-david@tethera.net>
\r
32 X-Mailer: git-send-email 2.1.3
\r
33 X-BeenThere: notmuch@notmuchmail.org
\r
34 X-Mailman-Version: 2.1.13
\r
36 List-Id: "Use and development of the notmuch mail system."
\r
37 <notmuch.notmuchmail.org>
\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
39 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
41 List-Post: <mailto:notmuch@notmuchmail.org>
\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
45 X-List-Received-Date: Sun, 28 Dec 2014 17:37:53 -0000
\r
47 changes since the last round [1]
\r
49 - remove unused variable
\r
50 - fix the internal usage of n_d_open to use _verbose version
\r
51 - revert the hiding of query debugging.
\r
53 [1]: id:1419717937-1108-2-git-send-email-david@tethera.net
\r
55 diff --git a/lib/database.cc b/lib/database.cc
\r
56 index 16cd940..b144885 100644
\r
57 --- a/lib/database.cc
\r
58 +++ b/lib/database.cc
\r
59 @@ -377,7 +377,6 @@ _notmuch_database_log (notmuch_database_t *notmuch,
\r
63 - const char *message;
\r
65 va_start (va_args, format);
\r
67 @@ -693,9 +692,9 @@ notmuch_database_create_verbose (const char *path,
\r
71 - status = notmuch_database_open (path,
\r
72 - NOTMUCH_DATABASE_MODE_READ_WRITE,
\r
74 + status = notmuch_database_open_verbose (path,
\r
75 + NOTMUCH_DATABASE_MODE_READ_WRITE,
\r
76 + ¬much, &message);
\r
80 @@ -1101,13 +1100,18 @@ notmuch_database_compact (const char *path,
\r
81 notmuch_database_t *notmuch = NULL;
\r
82 struct stat statbuf;
\r
83 notmuch_bool_t keep_backup;
\r
84 + char *message = NULL;
\r
86 local = talloc_new (NULL);
\r
88 return NOTMUCH_STATUS_OUT_OF_MEMORY;
\r
90 - ret = notmuch_database_open (path, NOTMUCH_DATABASE_MODE_READ_WRITE, ¬much);
\r
91 + ret = notmuch_database_open_verbose (path,
\r
92 + NOTMUCH_DATABASE_MODE_READ_WRITE,
\r
96 + if (status_cb) status_cb (message, closure);
\r
100 diff --git a/lib/query.cc b/lib/query.cc
\r
101 index 2e20ab2..9ed420c 100644
\r
104 @@ -78,7 +78,7 @@ notmuch_query_create (notmuch_database_t *notmuch,
\r
105 notmuch_query_t *query;
\r
107 if (_debug_query ())
\r
108 - _notmuch_database_log (notmuch, "Query string is:\n%s\n", query_string);
\r
109 + fprintf (stderr, "Query string is:\n%s\n", query_string);
\r
111 query = talloc (notmuch, notmuch_query_t);
\r
112 if (unlikely (query == NULL))
\r
113 @@ -266,9 +266,9 @@ notmuch_query_search_messages (notmuch_query_t *query)
\r
116 if (_debug_query ()) {
\r
117 - _notmuch_database_log (notmuch, "Exclude query is:\n%s\n",
\r
118 + fprintf (stderr, "Exclude query is:\n%s\n",
\r
119 exclude_query.get_description ().c_str ());
\r
120 - _notmuch_database_log (notmuch, "Final query is:\n%s\n",
\r
121 + fprintf (stderr, "Final query is:\n%s\n",
\r
122 final_query.get_description ().c_str ());
\r
125 @@ -549,9 +549,9 @@ notmuch_query_count_messages (notmuch_query_t *query)
\r
126 enquire.set_docid_order(Xapian::Enquire::ASCENDING);
\r
128 if (_debug_query ()) {
\r
129 - _notmuch_database_log (notmuch, "Exclude query is:\n%s\n",
\r
130 + fprintf (stderr, "Exclude query is:\n%s\n",
\r
131 exclude_query.get_description ().c_str ());
\r
132 - _notmuch_database_log (notmuch, "Final query is:\n%s\n",
\r
133 + fprintf (stderr, "Final query is:\n%s\n",
\r
134 final_query.get_description ().c_str ());
\r
138 lib/database.cc | 14 +++++++++-----
\r
139 lib/query.cc | 10 +++++-----
\r
140 2 files changed, 14 insertions(+), 10 deletions(-)
\r