Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
12743 มุมมอง

I have set up a new Odoo 17 server. But the Odoo does not write a log file. The directory /var/log/odoo is empty.

The following values are defined in odoo.conf:

log_file = var/log/odoo

log_level = debug


How do I configure Odoo correctly so that it writes the log file?


Thanks for your help!

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,


1. Specify Full Path for log_file:


Make sure that you specify the full path for the log_file in the odoo.conf file. The path should be an absolute path to the location where you want the log file to be stored. For example:


log_file = /var/log/odoo/odoo.log


2. Ensure Proper Permissions:


Verify that the user running the Odoo server has the necessary permissions to write to the specified log directory. You may need to create the /var/log/odoo/ directory manually and grant appropriate permissions to the Odoo process.


sudo mkdir -p /var/log/odoo/


sudo chown -R odoo:odoo /var/log/odoo/


Replace odoo:odoo with the appropriate user and group if they differ on your system.


3.Restart Odoo Service:


After making changes to the configuration file, restart the Odoo service to apply the changes.


sudo service odoo-server restart


After restarting Odoo, check the specified log file (/var/log/odoo/odoo.log in this example) for any error messages or information related to the Odoo server. You can use tools like tail or cat to view the log content.


sudo tail -f /var/log/odoo/odoo.log


This command will display the latest log entries in real time.


Hope it helps


อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
0
มิ.ย. 25
2
0
มี.ค. 24
982
1
ธ.ค. 23
2237
1
มิ.ย. 23
15617
1
ม.ค. 22
2638