Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id DC0E840BFDF for ; Mon, 11 Oct 2010 06:27:28 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.6 X-Spam-Level: X-Spam-Status: No, score=-2.6 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OOkSLj6G0sFM for ; Mon, 11 Oct 2010 06:27:12 -0700 (PDT) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) by olra.theworths.org (Postfix) with ESMTP id 6482940BDAB for ; Mon, 11 Oct 2010 06:27:11 -0700 (PDT) Received: from rocinante.cs.unb.ca (fctnnbsc30w-142167176217.pppoe-dynamic.High-Speed.nb.bellaliant.net [142.167.176.217]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id o9BDR844003857 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Mon, 11 Oct 2010 10:27:11 -0300 Received: from bremner by rocinante.cs.unb.ca with local (Exim 4.72) (envelope-from ) id 1P5IPE-0004cQ-QJ for notmuch@notmuchmail.org; Mon, 11 Oct 2010 10:27:08 -0300 From: david@tethera.net To: notmuch@notmuchmail.org Subject: First draft of logging functionality. Date: Mon, 11 Oct 2010 10:26:54 -0300 Message-Id: <1286803617-17328-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.7.1 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Oct 2010 13:27:30 -0000 The patches following this message are my first attempt at implementing atomic logging for notmuch. The idea is that such logs could be useful in synchronizing notmuch instances. Feedback of any kind is welcome. I'm particularly interested in comments about the log format and performance. In my tests, logging adds about a 10% speed penalty (tagging ~3700 messages) if enabled. I'd be curious if people for whom tagging is slow could tell me if they take a bigger hit. If you want to test, add a stanza like [log] tags = /path/to/logfile to your notmuch config. About the format, I am currently using seconds-since-epoch json-quoted-message-id json-quoted-plus-minus-tag I know some of you will not be thrilled with the quoting format; I'm open to other ideas, but this is what was already existing in notmuch code. At the moment I wanted to push the quoting fairly far down the stack and use the same for all potential logging, but perhaps this is too much "design by convenient implementation". Canadian-Thanksgiving-Greetings, David