Se rendre au contenu
Menu
Cette question a été signalée
2 Réponses
9030 Vues

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
Ignorer
Meilleure réponse

[Please go through this.]

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

Avatar
Ignorer
Auteur

Thanks for the update

Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
1
juil. 25
2480
0
mai 23
2260
3
mars 25
23794
1
nov. 22
2141
1
mai 22
5684