How to rotate files in output plugin

Team,

I'm writing an output conf file and I want the output to be stored in a file. My conf file will get events once a day. I want when my conf file gets data tomorrow, it replaces the file of previous day to prevent filling up of disk space. is there any way to rotate files or replace files. write_behavior replaces events but I want to replace file.

Thanks
akhil

You might be able to write a ruby filter that checks if the file has today's date and removes it if it does. That would happen on every event, which adds some overhead. I do not think the file output can do that.