Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have a Webapp running on an Amazon EC2 Linux AMI. I've been trying to configure my Log4J file for logging but haven't been able to figure out where the logs are getting created.

This is my log4j config:

log4j.rootCategory=DEBUG, FILE
log4j.rootLogger=DEBUG, FILE

# Configure a rolling file appender
log4j.appender.FILE.layout.ConversionPattern=%p %d %t %c - %m%n


### log JDBC resource acquisition

### enable the following line if you want to track down connection ###
### leakages when using DriverManagerConnectionProvider ###

#Logging for spring framework

#Logging for jackson library
log4j.appender.FILE.org.codehaus.jackson = INFO

My user is ec2-user. Tomcat is running as a service and shows the user who started tomcat is tomcat.

So, where is my log file?

share|improve this question
I don't think the tomcat user would be allowed to write to /home/ec2-user/trelta/logs/ –  guido Mar 10 '13 at 8:35
So the will get created in the directory i mentioned if it had access? This is an absolute path right? I'm a noob at linux so don't really know.. –  Varun Achar Mar 10 '13 at 8:55
Try using a ConsoleAppender and see if the log messages go to <tomcat_dir>/logs/catalina.out –  guido Mar 10 '13 at 9:56

1 Answer 1

I'm on AWS EC2, Linux AMI, and relative path works fine. So if you set the file location like this:


you'll find the log file in /usr/share/${yourTomcatVersion}/logs/trelta.log.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.