couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: Please review console.log() branch
Date Tue, 05 Feb 2013 11:13:49 GMT
"view_file" is an awkward name, won't output from shows, lists, etc,
also land here?

On 5 February 2013 10:15, Jason Smith <jhs@apache.org> wrote:
> I want to merge this: https://github.com/apache/couchdb/commits/console_log
>
> Please comment if you have a moment. It is two changes.
>
> ## console.log()
>
> In addition to good old log(), there is console.log(). It behaves exactly
> like Node.js. It supports a format string and variable arguments.
>
>     console.log("doc id is %s and count is %d", doc._id, doc.count)
>     console.dir("doc = %j", doc) // JSON format
>     console.log("Full request\n%s", util.inspect(req))
>     return {
>       body: util.format("<title>%s</title", title)
>     }
>     // etc.
>
> ## Separate log file for JavaScript
>
> _config/log/view_file = "js.log"
>
> If this is set, every log() or console.log() will additionally go to this
> file. There are no timestamps, no formatting. It is like a console.
>
> I was thinking of adding /_log support, cleaning it up, and then merging it
> in.

Mime
View raw message