Compressing Commonlogging files

Hello,

Is there any way to compress the CommonLogging files?

I am curently using the below configuration but I want to compress the older files as they are using too much space.

<Message>{logData}
</Message>
<FileName>ABCD.log</FileName>
<FileRotationOptions rotateFileOnStartup="true">
<FileRotationType>TIME_SIZE</FileRotationType>
<MaxFileSizeInMB>20</MaxFileSizeInMB>
<MaxFilesToRetain>30</MaxFilesToRetain>
<RotationFrequency unit="minute">1440</RotationFrequency>
</FileRotationOptions>
</File>

Also, I tried to compress them using cronjobs but the "MaxFilesToRetain" doesn't seem to work on the already compressed files and I end up with more than 30 files.


Any suggestions?

Thank you.

Solved Solved
0 1 60
1 ACCEPTED SOLUTION

Not applicable

One way we follow is, we move the logs older than a week to another storage server using cron. That helps us maintain the space management in Apigee components. also we do push the logs to splunk, so it's safe for us to remove Apigee old logs.

View solution in original post

1 REPLY 1

Not applicable

One way we follow is, we move the logs older than a week to another storage server using cron. That helps us maintain the space management in Apigee components. also we do push the logs to splunk, so it's safe for us to remove Apigee old logs.