Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to monitor console output (stdout) in an Elastic Beanstalk app?

I have successfully deployed a Node.js application to AWS Elastic Beanstalk. This application is not a web app, so there is no web page or web server to interact with. It runs continuously in a loop and provide feedback through standard "console.log" calls (to stdout).

How can I easily monitor my running application? Heroku has the "heroku logs" command, which is exactly the kind of tool I need. I tried the "eb logs" command, but the output is not what I am looking for (no stdout).

like image 990
extrabacon Avatar asked Jan 13 '23 00:01

extrabacon


1 Answers

I discovered that a Node.js EB app logs its output into /var/log/nodejs/nodejs.log. When extracting logs, through the web console or the "eb logs" command, look out for this log file.

like image 82
extrabacon Avatar answered Jan 17 '23 17:01

extrabacon