Hi,
I have been referring this link for handling logs in my project. As it says there the log will rotate when it exceeds certain size. All existing log files are moved backwards one place, i.e., '.2' to '.3', '.1' to '.2'.
This too happens upto 5 files (.5), loosing all the old logs.
I want it to rotate the log file at midnight like CI or Python and when it does the rotation, it should compress the old file (like CI). How do I do this? Please help.
Page 1 of 1
Rotating Log(Cfilelogroute) At 'midnight' When rotating the log at midnight, compress the old one; like CI does.
#2
Posted 19 April 2013 - 03:42 PM
Hussain, on 16 April 2013 - 09:27 AM, said:
I want it to rotate the log file at midnight like CI or Python and when it does the rotation, it should compress the old file (like CI). How do I do this? Please help.
If you are running a server running any soort of linux distribution I suggest you use the logrotate package. You can release log rotate on any log, it'll rotate the number you want and compress as well.
Share this topic:
Page 1 of 1

Help












