Log4j in Tomcat application on AWS Beanstalk

Asked

Viewed 59 times

1

I have a multi tenant application developed in Java WEB (Spring) that uses log4j to log logs. Each tenant saves their log files in a specific folder, corresponding to the tenant of the logged-in user. To do so I use the following configuration:

log4j.appender.<tenant> =org.apache.log4j.RollingFileAppender
log4j.appender.<tenant>.File=/home/user/sistemas/admin/logs/<tenant>/log.log
log4j.appender.<tenant>.Append=true
log4j.appender.<tenant>.MaxFileSize=500KB
log4j.appender.<tenant>.MaxBackupIndex=50
log4j.appender.<tenant>.layout=org.apache.log4j.PatternLayout
log4j.appender.<tenant>.layout.ConversionPattern=%-2d{dd/MM/yyyy HH:mm};%m%n

It has been working well, however the need to migrate the system to AWS Beanstalk has arisen. I was researching if this scheme would be possible to implement there, but I remained some doubts.

It is possible save log files and perform reading using only log4j in AWS Beanstalk, If so, which way I should set out, I ask for guidance in this regard. If it is not possible, how do you usually do this kind of work?

From now on, thank you.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.