First draft of logging functionality.
authordavid <david@tethera.net>
Mon, 11 Oct 2010 13:26:54 +0000 (10:26 +2100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:37:15 +0000 (09:37 -0800)
20/1a7c2ad5d1653452fd9e5b32b2c41e60e55805 [new file with mode: 0644]

diff --git a/20/1a7c2ad5d1653452fd9e5b32b2c41e60e55805 b/20/1a7c2ad5d1653452fd9e5b32b2c41e60e55805
new file mode 100644 (file)
index 0000000..171cf09
--- /dev/null
@@ -0,0 +1,78 @@
+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 DC0E840BFDF\r
+       for <notmuch@notmuchmail.org>; Mon, 11 Oct 2010 06:27:28 -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 OOkSLj6G0sFM for <notmuch@notmuchmail.org>;\r
+       Mon, 11 Oct 2010 06:27:12 -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 6482940BDAB\r
+       for <notmuch@notmuchmail.org>; Mon, 11 Oct 2010 06:27:11 -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 o9BDR844003857\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO)\r
+       for <notmuch@notmuchmail.org>; Mon, 11 Oct 2010 10:27:11 -0300\r
+Received: from bremner by rocinante.cs.unb.ca with local (Exim 4.72)\r
+       (envelope-from <bremner@unb.ca>) id 1P5IPE-0004cQ-QJ\r
+       for notmuch@notmuchmail.org; Mon, 11 Oct 2010 10:27:08 -0300\r
+From: david@tethera.net\r
+To: notmuch@notmuchmail.org\r
+Subject: First draft of logging functionality.\r
+Date: Mon, 11 Oct 2010 10:26:54 -0300\r
+Message-Id: <1286803617-17328-1-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.1\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: Mon, 11 Oct 2010 13:27:30 -0000\r
+\r
+The patches following this message are my first attempt at\r
+implementing atomic logging for notmuch.  The idea is that such logs\r
+could be useful in synchronizing notmuch instances.\r
+\r
+Feedback of any kind is welcome. I'm particularly interested in\r
+comments about the log format and performance.\r
+\r
+In my tests, logging adds about a 10% speed penalty (tagging ~3700\r
+messages) if enabled. I'd be curious if people for whom tagging is\r
+slow could tell me if they take a bigger hit. If you want to test, add\r
+a stanza like\r
+\r
+[log]\r
+tags = /path/to/logfile\r
+\r
+to your notmuch config.\r
+\r
+About the format, I am currently using\r
+\r
+seconds-since-epoch json-quoted-message-id json-quoted-plus-minus-tag\r
+\r
+I know some of you will not be thrilled with the quoting format; I'm\r
+open to other ideas, but this is what was already existing in notmuch\r
+code.  At the moment I wanted to push the quoting fairly far down the\r
+stack and use the same for all potential logging, but perhaps this is\r
+too much "design by convenient implementation".\r
+\r
+Canadian-Thanksgiving-Greetings,\r
+\r
+David\r