跳至内容
菜单
此问题已终结
2 回复
9037 查看

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..:)

形象
丢弃
最佳答案

[Please go through this.]

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

形象
丢弃
编写者

Thanks for the update

最佳答案

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



 

形象
丢弃
相关帖文 回复 查看 活动
1
7月 25
2484
0
5月 23
2261
3
3月 25
23797
1
11月 22
2145
1
5月 22
5685