Symantec Privileged Access Management

 View Only

pim_delete_old_jboss_logs.zip 

Nov 19, 2015 04:23 PM

I had a customer who asked about jboss log rotation, specifically deleting older files to avoid running low on disk spacce. By default we use the DailyRollingFileAppender which does not include any functionality to delete older files.

 

We discussed using a size based file rolling file appender which has the MaxBackupIndex parameter which specifies the number of files to keep, but this makes debugging a little harder than when you have daily files which allow you to determine which old log file contains entries from a specific date.

 

We decided the best approach to take was to keep using DailyRollingFileAppender and then schedule a script to delete the older files.

 

I wrote the attached batch script which, by default, keeps the last 28 (this can be changed) server.log.yyyy-mm-dd files. Instructions in comments in the file.

Statistics
0 Favorited
0 Views
1 Files
0 Shares
0 Downloads
Attachment(s)
zip file
pim_delete_old_jboss_logs.zip   489 B   1 version
Uploaded - May 29, 2019

Tags and Keywords

Comments

Nov 19, 2015 05:34 PM

Your wish is my command... pim_delete_old_jboss_logs.sh.tar.gz

Nov 19, 2015 04:37 PM

Hi Simon,

 

This is good.

 

Lets try and get a UNIX version as well.

 

Regards,

 

Amit.

Related Entries and Links

No Related Resource entered.