Configuring the eiPlatform to Auto Clean Up Old Log Files
As you may have seen, by default the eiPlatform’s logging configuration will create a new log file each day and will not delete old files. However the eiPlatform can be configured to clean up old log files. To do that, you will need the custom logger class in the attached zip, and the logConfig.xml configuration file that is also in the attached zip.
- Unzip the attached Log4jCleaningLogger.zip file
- Copy the log4jDailyRollingFileAppenderWithCleanup.jar file into “C:\Program Files\PilotFish Technology\eiPlatform Windows\runtime\”.
- Backup the existing logConfig.xml file in “C:\Program Files\PilotFish Technology\eiPlatform Windows\” and replace with the logConfig.xml file from the zip file.
- Restart the eiPlatform service.
This will configure the eiPlatform to only keep the log files from the last 7 days. To change it to 5 days, edit the logConfig.xml file and on lines 17 and 18 change the maximumLogFiles and maximumLogDays settings from 7 to 5.
Feel free to contact firstname.lastname@example.org for any questions that you may have.