Follow the steps below to configure logging for Log Agent,
-
Edit the file $CONNECT/components/logAgent/swarm/config/log4j2.xml
-
Edit the file $CONNECT/components/logAgent/swarm/config/run/logrotate.conf, to configure MongoDB log retention.
The default configuration retains logs for 7 days, rotates them at least once a day or when it reaches 10 MB in size. For more information, see https://linux.die.net/man/8/logrotate