Return-Path: Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: (qmail 22058 invoked from network); 18 Oct 2009 01:16:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Oct 2009 01:16:20 -0000 Received: (qmail 34864 invoked by uid 500); 18 Oct 2009 01:16:19 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 34777 invoked by uid 500); 18 Oct 2009 01:16:19 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 34767 invoked by uid 99); 18 Oct 2009 01:16:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Oct 2009 01:16:19 +0000 X-ASF-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 18 Oct 2009 01:16:16 +0000 Received: from [10.0.1.3] (i59F4FDD7.versanet.de [::ffff:89.244.253.215]) (AUTH: LOGIN jan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Sun, 18 Oct 2009 01:15:54 +0000 From: Jan Lehnardt Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Subject: Logging into a database Date: Sun, 18 Oct 2009 03:15:53 +0200 Message-Id: To: dev@couchdb.apache.org Mime-Version: 1.0 (Apple Message framework v1076) X-Mailer: Apple Mail (2.1076) Hey all, I had an itch to scratch and now there is an experimental branch that enables logging to a database: http://github.com/janl/couchdb/commits/log-to-db Check out the test case on how it is supposed to work: http://github.com/janl/couchdb/blob/5cbfbeaddea2152e35b88cae515152f78d6b7544/share/www/script/test/log_database.js You just create a `database = dbname` entry in your configuration under the `[log]` section and CouchDB will start to write log entries to the specified database. Depending on the log level this means that each single request to CouchDB triggers multiple writes to the log database. The logger, for now, defaults to delayed_commits. A future improvement, could be using the `batch=ok` module. I just wanted to throw this out here inspired by Chris' "releasing things before I go to sleep for the night". Let me know what you think. Cheers Jan --