Article 6FF97 Can I use logrotate for dynamic file path structure?

Can I use logrotate for dynamic file path structure?

by
james000
from LinuxQuestions.org on (#6FF97)
I have a logger server on Centos 7, which collects logs from various clients and save them in different directories based on dates. That means, everyday new directory will be created as below :
Code:/export/logs/app1/system/2023/10/08/messages
/export/logs/app1/system/2023/10/09/messages
/export/logs/app1/system/2023/10/10/messages
/export/logs/app1/app_log/2023/10/08/app_messages
/export/logs/app1/app_log/2023/10/09/app_messages
/export/logs/app1/app_log/2023/10/10/app_messagesI am trying to find if logrotate can be used to compress after a week and delete after an year. But as I am reading, in logrotate I will need to put static directory name and in my case directory will be changed everyday. Is it possible with logrotate?

Please advice. Thanks
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments