Re: REST API endpoint for accessing application logs


Ponraj E
 

Hi ,

I executed the command with manually putting the outh token -pasting the o/p here:

C:\WINDOWS\system32>curl -k -H "Authorization: bearer xxxx" "https://doppler.xx.xxx.xxxxxxxx:443/apps/e0dc9133-f800-416d-9e1f-ffeb8d02e4dd/recentlogs"
--1f51e48e4a9bf243ed1e2ab55c090c4d2deb23a7ae255c5c1d8ad178acb9


◄dea_logging_agent►♣0│┌üªπ╩áç¶j2z☺1é☺♀10.78.150.44B╜☺
Ç☺Mon, 19 Oct 2015 06:23:56 GMT express deprecated res.send(status, body): Use res.status(status).se
nd(body) instead at app.js:7:7►☻↑╜╜üªπ╩áç¶"$e0dc9133-f800-416d-9e1f-ffeb8d02e4dd*♥App2☺1
--1f51e48e4a9bf243ed1e2ab55c090c4d2deb23a7ae255c5c1d8ad178acb9


router__0►♣0₧π╪á½╩áç¶j
10.78.149.103B╔♥router_z1z☺0é☺
app_url - [19/10/2015:06:23:41 +0000] "GET / HTTP/1.1" 2
00 0 40 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.
2454.101 Safari/537.36" 10.78.148.7:59978 x_forwarded_for:"ip_addr" vcap_request_id:1cbd4f2d-
84c6-4ef9-6f44-e0c84a4d5e49 response_time:0.624678694 app_id:e0dc9133-f800-416d-9e1f-ffeb8d02e4dd
►☺↑└╥╪á½╩áç¶"$e0dc9133-f800-416d-9e1f-ffeb8d02e4dd*♥RTR2☺0
--1f51e48e4a9bf243ed1e2ab55c090c4d2deb23a7ae255c5c1d8ad178acb9


router__0►♣0Ç╩ΩεΓ╩áç¶j
10.78.149.103B╔♥router_z1z☺0é☺
app_url - [19/10/2015:06:23:56 +0000] "GET / HTTP/1.1" 2
00 0 40 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.
2454.101 Safari/537.36" 10.78.148.7:59978 x_forwarded_for:"ip_addr" vcap_request_id:758c85b6-
dfef-41dc-5def-dc76ccf01498 response_time:0.999714512 app_id:e0dc9133-f800-416d-9e1f-ffeb8d02e4dd
►☺↑█╜ΩεΓ╩áç¶"$e0dc9133-f800-416d-9e1f-ffeb8d02e4dd*♥RTR2☺0
--1f51e48e4a9bf243ed1e2ab55c090c4d2deb23a7ae255c5c1d8ad178acb9--


Questions:

1. What is this guid that the command prints multiple times?

--1f51e48e4a9bf243ed1e2ab55c090c4d2deb23a7ae255c5c1d8ad178acb9--

2. Some of the output is garbled and some are not.

3. As rohit said in the previous comment, I tried installing the noaa client library and executed the sample app
to get the application logs : https://github.com/cloudfoundry/noaa

go build -o bin/sample sample/main.go

My DOPPLER_ADDR env is "https://doppler.xx.xxx.xxxxxxxx.xxx:443"

So when i run the sample.exe, I get the o/p as
===== Error getting recent messages: parse "https://doppler.xx.xxx.xxxxxxxx.xxx:443": invalid URI for request

Am not sure, how is this URI invalid?


---
Ponraj

Join cf-dev@lists.cloudfoundry.org to automatically receive all group messages.