AM does not rotate Fedlet debug logs by default, but you can configure it to do so based on:
- Time interval (in minutes) - for example, every 1440 minutes for once a day. The time interval specified starts when the first log message is logged to the log file.
- Size (in MB) - for example, when the debug log reaches 2MB.
It is recommended that you copy the debug logs prior to clearing the contents, rather than deleting the logs as this can cause issues if a process is still holding a filehandle. Additionally, you should keep debug logging to a minimum (level: error) and only increase it when troubleshooting an issue.
To configure Fedlet debug file rotation:
- Copy the debugconfig.properties file (located in the /path/to/tomcat/webapps/openam/WEB-INF/classes directory) to a temporary location.
- Edit the properties in the debugconfig.properties file as detailed in Rotating Debug Logs to configure debug log file rotation. For example, if you want your Fedlet debug logs to rotate every 1440 minutes with a suffix of the date and time, you would set the rotation and suffix properties in this file as follows: org.forgerock.openam.debug.rotation=1440 org.forgerock.openam.debug.suffix=-MM.dd.yyyy-HH.mm Alternatively, if you want your debug logs to rotate each time they reach 2MB with a suffix of the date and time, you would set the maxsize and suffix properties in this file as follows: org.forgerock.openam.debug.rotation.maxsize=2 org.forgerock.openam.debug.suffix=-MM.dd.yyyy-HH.mm_ss.SSS
- Copy the debugconfig.properties file to the /path/to/deployed/fedlet/WEB-INF/classes directory. Alternatively, you can package the debugconfig.properties file in the appropriate Fedlet WAR file (in the /WEB-INF/classes directory) and redeploy.
- Restart the web application container in which the Fedlet runs to apply these configuration changes.