Reputation: 1023
We have deployed our web application to Amazon EC2. And we can't create logs after deployement. How amazon store logs or how can we get logs in Amazon EC2?
EDIT:
How to configure log4j properties for Amazon cloud?
Any ideas or guidence with logging in Amazon EC2?
Upvotes: 1
Views: 2763
Reputation: 1609
Are you using Elastic Beanstalk? If so, I'd check Amazon's docs on that specifically. I find their AWS docs to be very good, once you find the right one to look at (navigation is not so great).
If you're on "plain" EC2 and not using beanstalk, then you are in complete control of the server, so you need to configure logging yourself, just like if you were running your own physical server. Specifically, make sure your log4j configuration is correct. If you're using Tomcat and are unfamiliar with it, I believe Tomcat has its own setup that it uses for its internal logging, and you may want to name your application's log4j configuration file something specific like log4j_appname.xml so that it doesn't conflict -- otherwise you may be logging to Tomcat's output directory.
Upvotes: 1