I have a multi tenant application developed in Java WEB (Spring) that uses log4j to register the logs. Each tenant writes its log files to a specific folder, corresponding to the user's tenant logged in. For this 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's working fine, however, there's a need to migrate the system to AWS Beanstalk. I've been researching if this scheme could be implemented there, but I had some doubts.
You can save log files and read using only log4j in the AWS Beanstalk , if yes which path should I set, in this aspect. If it is not possible, in what way do you usually do this kind of work?
Thanks in advance.