sound interresting . I wonder if we couldn't add live streaming as
well. Using event-source and long polling (also continuous)

On Thu, Nov 8, 2012 at 10:16 AM, Garren Smith <[email protected]> wrote:
>
> Hi Guys,
>
> I want yo submit a patch to couchdb. If you request the couchdb logs 
> (http://127.0.0.1:5984/_log) I want the option of getting them returned in 
> json format. This makes it much easier to work with the logs in javascript. 
> I've done a first attempt here - https://gist.github.com/4037682 Basically 
> replace from line 251 onwards in file couch_httpd_misc_handlers.erl, compile, 
> run then curl http://127.0.0.1:5984/_log?format=json for JSON log output.
>
> I've added the format="json" q-value for when the request wants it to be 
> formatted in json. Hopefully there is a better way of doing this. Some things 
> I would like checked:
>
> 1) Is there a easier way of formatting the code to json or a less splitting 
> of code by brackets etc to get the Json?
> 2) Is the code formatted correctly for couchdb?
> 2) Should the json helper methods be in couch_httpd_misc_handlers.erl or 
> couch_log.erl?
> 3) Am I remotely on the right track here, I'm very new to erlang so welcome 
> any feedback. I will happily accept the statement "Garren you clearly are 
> clueless, step back and let the pros do this kind of work"?
>
> Cheers
> Garren

Reply via email to