简体   繁体   中英

Logging in a web application that deployed in Amazon EC2

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM