Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ipfs log ls HTTP Response is poorly formatted #2636

Closed
RichardLitt opened this issue May 6, 2016 · 0 comments · Fixed by #2637
Closed

ipfs log ls HTTP Response is poorly formatted #2636

RichardLitt opened this issue May 6, 2016 · 0 comments · Fixed by #2637

Comments

@RichardLitt
Copy link
Member

$ curl -i "http://localhost:5001/api/v0/log/ls"
HTTP/1.1 200 OK
Access-Control-Allow-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Access-Control-Expose-Headers: X-Stream-Output, X-Chunked-Output, X-Content-Length
Content-Type: application/json
Server: go-ipfs/0.4.1
Trailer: X-Stream-Error
Date: Fri, 06 May 2016 23:16:31 GMT
Transfer-Encoding: chunked

{"Message":"importer\nfuse/ipfs\ntour\nipns-repub\nofflinerouting\nnamesys\ncoreunix\nlock\nnode\nsupernode\nconfig\ncorerepo\nsupernode/proxy\ncmd/ipfs\npin\nbitswap\nmount\ncore\nipfsaddr\ndht.pb\nengine\ndagio\ncommand\nflatfs\ntarfmt\ncore/commands\nblockset\ncore/server\npath\ndiagnostics\nfsrepo\ncmds/files\neventlog\nrouting/record\ndht\nbitswap_network\nchunk\nmfs\ncommands/http\ntable\nblockservice\nmerkledag\nmockrouter\nreprovider\ngc\nfuse/ipns\nblockstore\n"}

It should be:

{"logs": ["importer", "fuse/ipfs", "mount", ...] }

I spent 1.5 hours trying to figure out how to do this and gave up. :(

RichardLitt added a commit that referenced this issue May 6, 2016
This uses a stringList to output each log command as an item in an array in an object called Strings, instead of using the MessageOutput func.

This closes #2636.

License: MIT
Signed-off-by: Richard Littauer <richard.littauer@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant