Second draft of logging patches
authordavid <david@tethera.net>
Sun, 24 Oct 2010 21:01:02 +0000 (18:01 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:18 +0000 (09:37 -0800)
f2/46bd19d082f07ab5d526e949e324c084f79512 [new file with mode: 0644]

diff --git a/f2/46bd19d082f07ab5d526e949e324c084f79512 b/f2/46bd19d082f07ab5d526e949e324c084f79512
new file mode 100644 (file)
index 0000000..eea8f49
--- /dev/null
@@ -0,0 +1,70 @@
+Return-Path: <bremner@unb.ca>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 93C6F40D148\r
+       for <notmuch@notmuchmail.org>; Sun, 24 Oct 2010 14:01:51 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -2.6\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5\r
+       tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id gY7BJGA67+0X for <notmuch@notmuchmail.org>;\r
+       Sun, 24 Oct 2010 14:01:37 -0700 (PDT)\r
+Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21])\r
+       by olra.theworths.org (Postfix) with ESMTP id AD9A440D155\r
+       for <notmuch@notmuchmail.org>; Sun, 24 Oct 2010 14:01:14 -0700 (PDT)\r
+Received: from rocinante.cs.unb.ca\r
+       (fctnnbsc30w-142167176217.pppoe-dynamic.High-Speed.nb.bellaliant.net\r
+       [142.167.176.217]) (authenticated bits=0)\r
+       by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id o9OL1BmO017808\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO)\r
+       for <notmuch@notmuchmail.org>; Sun, 24 Oct 2010 18:01:14 -0300\r
+Received: from bremner by rocinante.cs.unb.ca with local (Exim 4.72)\r
+       (envelope-from <bremner@unb.ca>) id 1PA7gl-0006Oi-Ao\r
+       for notmuch@notmuchmail.org; Sun, 24 Oct 2010 18:01:11 -0300\r
+From: david@tethera.net\r
+To: notmuch@notmuchmail.org\r
+Subject: Second draft of logging patches\r
+Date: Sun, 24 Oct 2010 18:01:02 -0300\r
+Message-Id: <1287954066-24512-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.1\r
+In-Reply-To: <1286803617-17328-1-git-send-email-david@tethera.net>\r
+References: <1286803617-17328-1-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sun, 24 Oct 2010 21:01:52 -0000\r
+\r
+Here is my second try at logging, taking into account the feedback I\r
+got from Rob and Michal.  There is definitely some tidying to do; in\r
+particular I know the protoypes in public headers need\r
+documentation. Also, I should add a configuration option to\r
+enable configuration by command or something like that.\r
+\r
+It does do write-ahead logging for tag changes, based on calls to\r
+notmuch_message_(freeze|thaw).\r
+\r
+It is more or less hardcoded to output to .notmuch/log\r
+\r
+At the moment the buffering is line by line, but in principle this\r
+just needs to be changed in one place (the call to notmuch_log_open).\r
+\r
+Currently logging is disabled by default, unless a call to\r
+notmuch_database_open_log is made. In the long run, if we keep this\r
+code, then maybe the API of notmuch_database_open should be\r
+modified to optionally enable logging.\r
+\r
+\r