In the log4j2.properties file you need to edit these settings:
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
appender.rolling.policies.size.size = 100MB
appender.rolling.strategy.type = DefaultRolloverStrategy
appender.rolling.strategy.max = 30
This means that the files will rollover at 100MB and 30 files will be kept.
Change those numbers to reflect what would work best for your environment and then restart logstash.