I have the following logging problem with several Java applications using log4j for logging:
log4j
I want log files to be rotated daily, like
You can perform your housekeeping in a separate script which can be cronned to run daily. Something like this:
find /path/to/logs -type f -mtime +7 -exec rm -f {} \;