Manage Log Growth
To manage log growth in Carbon logs, you can configure the following settings in the <UEM_HOME>/repository/conf/log4j2.properties
file.
Increase the Maximum Log File Size
To increase the default maximum size of the log file, add the following configuration:
Replace<file_size_limit>
with the desired maximum size of the log file (e.g., 10MB, 50MB).
Enable Log File Rollover with Sequential Numbering
To add a sequential number to the log file name when rolling over to a new file after reaching the maximum file size, configure the file pattern as follows:
appender.CARBON_LOGFILE.filePattern = ${sys:carbon.home}/repository/logs/wso2carbon-%d{mm-dd-yyyy}-%i.log
This will create new log files with a number appended to the file name, ensuring that logs are rotated and saved with unique names (e.g., wso2carbon-10-10-2024-1.log, wso2carbon-10-10-2024-2.log).