[PATCH 4/4] Enable logging in notmuch-tag.c

david at tethera.net david at tethera.net
Sun Oct 24 14:01:06 PDT 2010


From: David Bremner <bremner at unb.ca>

Currently a separate function must be called to enable logging; this API is subject to change.
---
 notmuch-tag.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/notmuch-tag.c b/notmuch-tag.c
index fd54bc7..bd7bfbc 100644
--- a/notmuch-tag.c
+++ b/notmuch-tag.c
@@ -101,6 +101,11 @@ notmuch_tag_command (void *ctx, unused (int argc), unused (char *argv[]))
     if (notmuch == NULL)
 	return 1;
 
+    if (notmuch_database_open_log(notmuch) != NOTMUCH_STATUS_SUCCESS){
+	fprintf (stderr, "Failed to open log\n");
+	return 1;
+    }
+
     query = notmuch_query_create (notmuch, query_string);
     if (query == NULL) {
 	fprintf (stderr, "Out of memory.\n");
-- 
1.7.1



More information about the notmuch mailing list