Is it possible to maintain or show gateway log with specific time period only

Hello Team,
I want to maintain latest gateway log only for 3 months. the logs older than 3 months need to delete or archive. for that is there any way how to achieve this.