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 B959B40D144 for ; Tue, 12 Oct 2010 04:21:54 -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 i3Fu2vm-oewm for ; Tue, 12 Oct 2010 04:21:44 -0700 (PDT) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) by olra.theworths.org (Postfix) with ESMTP id D4DE940D143 for ; Tue, 12 Oct 2010 04:21:43 -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 o9CBLbIP021014 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Tue, 12 Oct 2010 08:21:38 -0300 Received: from bremner by rocinante.cs.unb.ca with local (Exim 4.72) (envelope-from ) id 1P5cvJ-0003N9-Nd; Tue, 12 Oct 2010 08:21:37 -0300 From: David Bremner To: Michal Sojka , notmuch@notmuchmail.org Subject: Re: First draft of logging functionality. In-Reply-To: <87zkuj3hme.fsf@steelpick.2x.cz> References: <1286803617-17328-1-git-send-email-david@tethera.net> <87zkuj3hme.fsf@steelpick.2x.cz> User-Agent: Notmuch/0.3.1-59-g676d251 (http://notmuchmail.org) Emacs/23.2.1 (x86_64-pc-linux-gnu) Date: Tue, 12 Oct 2010 08:21:37 -0300 Message-ID: <87hbgrhd1a.fsf@rocinante.cs.unb.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Tue, 12 Oct 2010 11:21:54 -0000 On Tue, 12 Oct 2010 11:06:17 +0200, Michal Sojka wrote: > I'm not sure whether implementing logging facility outside of notmuch > library is a good thing. If somebody will use a third-party tool (such > as python bindings) to manipulate his tags, they won't appear in the > log. Yeah, thanks for that. I had been worrying about the same thing, but your message helped clarify things for me. I guess log files should be opened in notmuch_database_open, and the actual logging in this case could happen from notmuch_message_add_tag. >From an atomicity point of view it might make more sense to store up a list of log lines, and dump them all from _notmuch_message_sync. One could attach a log buffer to a message, and flush that atomically when syncing the message back to the database. In this context, it is a little more tedious to have more than one log file. d