I came accross this article for setting access logs in microservices:
However, in production access logs go up to a GB of data which makes quick looking into logs impossible.
Can it be configured as a rolling log?
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It only takes a minute to sign up.Sign up to join this community
We looked into the SpringBoot and Tomcat versions used and we can see that the setting which controls rotation based on format is not available on 8.5. See below more details.
8.5 uses SpringBoot 1.4.7.RELEASE + Tomcat 8.5.54
9.5 uses SpringBoot 2.1.18.RELEASE + Tomcat 9.0.45
The setting in question is not available in SpringBoot 1.4.7, but it is in SpringBoot 2.1.18:
The following links contain a list of all available settings.
So rolling access log is not possible in 8.5
I did a research about this. sharing my findings here.
Tomcat logs grow with no enforced size limits, they roll only once per day and are never purged in Tomcat.
Tomcat uses JULI logging by default, which does not provide for log file rotation based on the file size limit. The default JULI logging configuration will allow log files to grow unbounded and they will only roll once per day at the date change.
I can see some reference below solution to Switch Tomcat from JULI logging to log4j for Tomcat windows service. but not sure it's possible to do it in our DXD microservices since it uses Tomcat embedded with spring boot, I noticed our DXD 11.5 service uses tomcat-embed-core-9.0.35.jar. It looks like it uses Tomcat 9.0 jars.
In case if you are using AWS Elastic application load balancer then you could also think of enabling access logs in the ELB to S3 bucket. There are some tools available to analyze those logs.