Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0C4BE75B4 for ; Wed, 7 Dec 2011 11:21:59 +0000 (UTC) Received: (qmail 48399 invoked by uid 500); 7 Dec 2011 11:21:57 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 48365 invoked by uid 500); 7 Dec 2011 11:21:56 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 48357 invoked by uid 99); 7 Dec 2011 11:21:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2011 11:21:56 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kxepal@gmail.com designates 209.85.210.52 as permitted sender) Received: from [209.85.210.52] (HELO mail-pz0-f52.google.com) (209.85.210.52) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Dec 2011 11:21:50 +0000 Received: by daek6 with SMTP id k6so709359dae.11 for ; Wed, 07 Dec 2011 03:21:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=tcTm23Qe2cExpSPAk17DyNdBGREJ0YRLiLfcLgfOlsE=; b=x0Rz5/xftmKBvL5Q9lnYVJFb8yC66EK+u194J2VX2HLUUxtXMv6ukt7zR49GU13rdL OIsPS9L+3fFFpRY2Aq4ciJQ4sEVYQk0WJlhU2jAC/MbKyHmGj/o3mc05dRyv3NSN+Qk1 HLfzY2NWoW9GwaRtZuz70TO2jp0icEGbQQUfU= MIME-Version: 1.0 Received: by 10.68.12.37 with SMTP id v5mr4625212pbb.90.1323256889617; Wed, 07 Dec 2011 03:21:29 -0800 (PST) Received: by 10.68.5.7 with HTTP; Wed, 7 Dec 2011 03:21:29 -0800 (PST) In-Reply-To: References: Date: Wed, 7 Dec 2011 14:21:29 +0300 Message-ID: Subject: Re: The perfect logger From: Alexander Shorin To: user@couchdb.apache.org Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org Hi, Jason! Adding native support of syslog[1]/event journal (I hope, windows hosts wouldn't be forgotten?) will be great - it solves a lot of tasks about: what to log; what the message receiver will be; what handlers to apply and so on. Of course, for windows you will have to write some script that will be subscribed on CouchDB journal, but each tool should do it own work. However, idea with one line per message is bad if exception had occurred, because I need to get record that could answer on next questions: 1. What's happened? 2. When it was? 3. How it could even be? 4. What the environment was to help me reproduce it? Without stack traces this messages would be useless to get operative reaction on problem. I'd prefer to receive powerful and handy tool that would help me in log analyze rather than ability to easy grep from cli. About log database. From one side this is very sweet idea and I'm addicted from it too - it's very handy to make nicer log reports, generate events statistic and more -, but if syslog support will be added, so it will be his task to decide what write and where - there will be no needs to duplicate functionality. However, it will be great to receive syslog couchdb plugin out of box. And what about others query servers? Ruby, clojure, python...I don't worry about python one due to it has very powerful logging module, but I suppose there should be fair logging API on query server protocol side. By the way, someone some time has idea about adding more log levels to query server[2] and make them configurable. May be it's time to implement this feature?(: That's small batch of my thoughts(: Sorry for my English. [1] https://issues.apache.org/jira/browse/COUCHDB-706 [2] https://github.com/apache/couchdb/blob/master/share/server/util.js#L145 -- ,,,^..^,,, On Wed, Dec 7, 2011 at 6:28 AM, Jason Smith wrote: > Hi, all. I am brainstorming features for the perfect CouchDB logging > support. I want to know, if God snapped his fingers and logging in > CouchDB was perfect according to You, what would that look like? > > I posted a similar email in the development list, but here I am > focusing on features that sysadmins and application developers want. > > This is the brainstorming and requirements gathering phase. I will > compile feedback into a spec on the wiki. > > For me, here is what I would like to see, in no particular order: > > * Opt-in. No surprising changes to the log format or anything. > > * Traditional log targets such as syslog, syslog-ng > > * One message per line, no more crazy multi-line stack traces. You > should be able to do useful things with `perl -n` > > * Javascript errors make more sense. (I know that is vague, it's not a > personal pain point but I believe it is problematic for most people.) > > * Ability to send debug, info, and error logs to different places (or no place) > > * Ability to send Javascript errors and logs to their own place > > * Log to a database. This is the elephant in the room. This is huge > goal, with lots of complications. It will probably be cut from the > first iteration. But this is basically my end game for all this. We > want a database or databases which catches requests to our couchapp, > vhost rules applied, rewrite rules applied, our log() calls from > Javascript, and of course exceptions. And we want a web Couch app to > present that and let us sort and filter. And the app will follow the > _changes feed and give us a real-time "tail -f" of our work, minus > Erlang stack traces. > > -- > Iris Couch