I want to create a simple log rotation for the following scenario:
I have a script that when executed will write debug and error messages
to a specific file (say script.log).
I want to create log rotation such a way that if the file size of
script.log exceeds say 500KB, I want to rename script.log as
script<day>1.lo g and the latest logs to be written to script.log.
Essentially script.log should have the recent 500KB of logs.
Is there any such inbuilt mechanism, else can you give some pointers
to do this.
Thanks
I have a script that when executed will write debug and error messages
to a specific file (say script.log).
I want to create log rotation such a way that if the file size of
script.log exceeds say 500KB, I want to rename script.log as
script<day>1.lo g and the latest logs to be written to script.log.
Essentially script.log should have the recent 500KB of logs.
Is there any such inbuilt mechanism, else can you give some pointers
to do this.
Thanks
Comment