I have an application creating logfiles in a structure like this:
maillog/
2012-07-02/
production_environment-2012-07-02__23_51_50-1341265910-some name.log
production_environment-2012-07-02__23_51_52-1341265912-some other name.log
...
2012-07-03/
production_environment-2012-07-03__04_26_47-1341282407-third name.log
production_environment-2012-07-03__04_26_47-1341282407-more names.log
...
2012-07-04/
...
2012-07-05/
...
I am looking for a good way to rotate those logdirectories.
If possible I would like to compress the files in each directory (no problem with logrotate) and rotate the dated directories (not possible with logrotate?).
I am hesitant to script something like this myself since I am sure that there are some good tools out there to do this kind of job.
Any ideas how to approach this?