dimanche 24 mai 2015

Golang Web app on AWS with Elastic Beanstalk - Logs Not Showing?

This is sort of an in-depth question, so I'll try to explain it as best I can.

I've built a small API service in Golang that I'm trying to deploy to AWS using the relatively new AWS Elastic Beanstalk Docker support.

Here's what I've done (the code is all open source, so you can follow along if you'd like):

$ git clone http://ift.tt/1F9Woxy
$ cd ipify-api
$ git fetch origin aws:aws
$ git checkout aws
$ eb init
$ eb create
$ eb deploy

This will use elastic beanstalk to create a new app (with docker), and deploy it.

If I then run:

$ eb open

To open my web app, I'll see my public IP address displayed (this is the correct behavior), so I know that my application is running / functional.

Now -- in my source code, I've got several lines of debugging output:

fmt.Println("WOOOOOOOOOOOO")

The above statement just prints "WOO.." to the console. This is run every time a new request is made.

Unfortunately, when I run $ eb logs to view my instance logs, this debug line never shows up -- and I can't figure out why.

I've tried printing to STDERR, printing to STDOUT, etc. -- but I'm absolutely unable to get any output.

I've scoured the internet looking for solutions, but have yet to find any.




Aucun commentaire:

Enregistrer un commentaire