Skip to Content
Menu
This question has been flagged
2 Replies
7545 Views

In Odoo13, 'logrotate = True' parameter is not working. So logs are updating in same file & file size is getting larger. Now I need to manually delete the log files to save the space in server.

In Odoo12 & below versions, if we set logrotate=True, log files were saved to corresponding dates & logs greater than particular interval will delete from the server also.

Why this is not working in Odoo13?

If there have any  other methods to implement log rotation, please share the steps.


Thanks in advance..:)

Avatar
Discard
Best Answer

[Please go through this.]

https://github.com/odoo/odoo/commit/92d5a4bce5a3878e10427ec8dfef8c4b21f64f3d#diff-3ed4d091d4b03006d32f1f4468c2c630895f957d0ac6016be7c73852e885b800

Avatar
Discard
Author

Thanks for the update

Best Answer

However you can use still use logrotate as per below steps-

  • create a new file under
    • vi /etc/logrotate.d/yourodoo-app
    • Copy paste below line for daily logs
/var/log/example-app/*.log {
    daily
    missingok
    rotate 14
    compress
    notifempty
    create 0640 www-data www-data
    sharedscripts
    postrotate
        systemctl reload example-app
    endscript
}

For reference check below tutorial

https://www.digitalocean.com/community/tutorials/how-to-manage-logfiles-with-logrotate-on-ubuntu-16-04



 

Avatar
Discard
Related Posts Replies Views Activity
1
Jul 23
1323
0
May 23
1489
3
Apr 23
18772
1
Nov 22
860
1
May 22
4636