Odooers论坛

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

Setup log file in odoo config file

形象
odoo
1 备注
形象
丢弃
形象
odoo
-
4 答案
0
形象
odoo
最佳答案

In V8 user=odoo, try this:

chown odoo  /var/log/openerp/openerp-server.log

and you add (or other handler):

log_handler = ["[':INFO']"]

形象
丢弃
0
形象
odoo
最佳答案


I do this but still not working

ls -l commande send this information:

[user@localhost openerp ] # ls -l

-rw-r--r--. 1 odoo root 0 Jan 28 15:25 openerp-server.log

and ther is my odoo config:

[options]
; This is the password that allows database operations:
admin_password=#####
db_host=localhost
db_port=5432
db_user=######
db_password=#######
addons_path=/usr/lib/python2.7/site-packages/openerp-8.0_c7d8e97-py2.7.egg/openerp/addons/
logfile=/var/log/openerp/openerp-server.log
log_handler=["[':INFO']"]
log_level=info

 

and whene i execute systemctl status openerp.service i got that

.................

python /usr/local/bin/openerp-server -c /etc/openerp-server.conf --pid=/run/openerp/openerp-server.pid --syslog

...................

Any help please !!!!!

 

4 注释
形象
丢弃
形象
odoo
-

you drop --syslog and posibbly add --logfile /var/log/openerp/openerp-server.log

形象
odoo
-

how can i do that

形象
odoo
-

I do not know what your system and install method, probably in /etc/init.d/odoo

形象
odoo
-

done thanks for help.

0
形象
odoo
最佳答案

Perhaps useful for others because this question was asked a long time ago.

In your configuration file add the following lines:

# Logging
log_handler = werkzeug:WARNING, :INFO
log_level = info
logfile = /var/log/odoo/odoo.log
logrotate = True

(Change settings as you seem fit. The following URL provides a list of command line parameters which can be used in the configuration file as well: https://odoo-development.readthedocs.io/en/latest/admin/log-handler.html)

It's important that the user under which odoo runs has write permissions to the directory where the log files are stored. In my case it runs as user odoo16 member of group odoo16. So using sudo or as root create a log directory for odoo as follows:

# mkdir /var/log/odoo

# chown root:odoo16 /var/log/odoo

# chmod 775 /var/log/odoo

# ls -l /var/log

drwxrwxr-x 2 root odoo16 4096 Oct 28 16:54 odoo


The result should be as above. Next restart your odoo service, odoo16 in my case.

# systemctl restart odoo16


形象
丢弃
0
形象
odoo
最佳答案

please can you give more details i hve a same issue when i check my odoo status i got this error 

/odoo.service; disabled; vendor preset: enabled)
since Wed 2021-09-01 16:45:57 UTC; 36min ago
odoo/odoo-bin -c /etc/odoo-server.conf (code=exited, status=2)
=2)
 Started Odoo.
4541]: Usage: odoo-bin [options]
4541]: odoo-bin: error: The config file '/etc/odoo-server.conf' selected with -c/--config doesn't exist or is not readable, use -s/--save if you want to gen>
 odoo.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
 odoo.service: Failed with result 'exit-code'.


形象
丢弃