I am using logrus package for logging. Want to rotate the logs on daily basis.
I have explored options like lumberjack and logrotate(8)
But lumberjack provides log rotation based on the size of the log file. Not sure if there is any way to make it rotate logs on daily basis.
For logrotate, I will have to create a separate config at the system level which I want to avoid as will have to look after two different things and scalability will an issue. Not sure how we can use this just by creating config at the project level or some other better approach.
So is there any way to do log rotating on a daily basis in Golang?