http://www.perlmonks.org?node_id=999023


in reply to Log File

See How can I roll over my logfiles automatically at midnight? in Log::Log4perl::FAQ:
When using Log::Dispatch::FileRotate, all you have to do is specify it in your Log::Log4perl configuration file and your logfiles will be rotated automatically.

You can choose between rolling based on a maximum size ("roll if greater than 10 MB") or based on a date pattern ("roll everyday at midnight").