From couchdb-dev-return-427-apmail-incubator-couchdb-dev-archive=incubator.apache.org@incubator.apache.org Sun May 25 13:37:54 2008 Return-Path: Delivered-To: apmail-incubator-couchdb-dev-archive@locus.apache.org Received: (qmail 37733 invoked from network); 25 May 2008 13:37:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 May 2008 13:37:54 -0000 Received: (qmail 38508 invoked by uid 500); 25 May 2008 13:37:54 -0000 Delivered-To: apmail-incubator-couchdb-dev-archive@incubator.apache.org Received: (qmail 38474 invoked by uid 500); 25 May 2008 13:37:54 -0000 Mailing-List: contact couchdb-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: couchdb-dev@incubator.apache.org Delivered-To: mailing list couchdb-dev@incubator.apache.org Received: (qmail 38463 invoked by uid 99); 25 May 2008 13:37:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 25 May 2008 06:37:54 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cmlenz@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Sun, 25 May 2008 13:36:59 +0000 Received: (qmail invoked by alias); 25 May 2008 13:37:20 -0000 Received: from dslb-084-058-054-055.pools.arcor-ip.net (EHLO [192.168.1.200]) [84.58.54.55] by mail.gmx.net (mp057) with SMTP; 25 May 2008 15:37:20 +0200 X-Authenticated: #2618757 X-Provags-ID: V01U2FsdGVkX1/q94wJr/TqZ7xw6Y+fVSqpXAp5yx+uOztwpngmTt K0Q7ZBSuKszLIV Message-Id: <52B9B2FA-79C3-4227-89F7-DBC012261F5C@gmx.de> From: Christopher Lenz To: couchdb-dev@incubator.apache.org In-Reply-To: <20080525130547.GI25236@bytesexual.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Subject: Re: logging from views Date: Sun, 25 May 2008 15:37:20 +0200 References: <20080525130547.GI25236@bytesexual.org> X-Mailer: Apple Mail (2.919.2) X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org On 25.05.2008, at 15:05, Noah Slater wrote: > On Sat, May 24, 2008 at 04:31:33PM -0700, Chris Anderson wrote: >> The only thing I'm not sure of is couchjs.tpl.in > > Yes, I'm not happy with that as it stands. > > Perhaps if this was to go forward I could add a "-l" option to > specify a log > file to write out STDERR. You could then specify this option in the > INI file. > > I don't know if this would work with the way Erlang invokes couchjs. > > Chris, what do you think? There's already a simple (but incomplete) provision for logging from the view server: you print a JSON-encoded line such as the following to stdout: {"log": "bla bla"} CouchDB will take that and write it to its own log output (at INFO level). The Javascript view server (share/server/main.js) uses this to log error messages. We could simply make this functionality available through a `log(message)` function that would be made available inside views. Cheers, -- Christopher Lenz cmlenz at gmx.de http://www.cmlenz.net/