This question has been flagged

I am using odoo version 12.0 Enterprise edition

I have defined logrotate = True in my configuration file

I think that by using Logrotate, weekly records for log files are generated and previous records are automatically been deleted to automatically manage memory space, hope so I am not wrong here

But I want Odoo not to delete previously generated Log Files and keep them as it is

Are there any different parameters to be added in the configuration file ?

How can I do that ?

Avatar
Discard
Best Answer
Goto /etc/logrotate.conf and define rotate in odoo conf params.

rotate count:- This specifies the number of times to rotate a file before it is deleted. A count of 0 (zero) means no copies are retained. A count of 5 means five copies are retained. 

eg:rotate 12

if you define weekly on conf and rotate is 12, 12 weeks logs can be retained.

instead of week you can also use, yearly, day, monthly

Here is an example of odoo logrotate configured:

​/var/log/odoo-server {
    monthly
    create 0664 root utmp
    rotate 12
}


Avatar
Discard