Configure Log File Sizes and Rollovers
You may want to limit the length of your agent log files to make troubleshooting easier. To do this, you can specify a maximum size for your log files. When a log reaches that size, it is then rolled over: the log file gets zipped, and a new blank log file is generated to store the next batch of log data. By default, a log file has a maximum size of 20 MB and can be rolled over four times. See Troubleshooting Java Agent Issues.
You can configure log rollover attributes in the log4j2.xml