Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
4 Trả lời
90570 Lượt xem

 

I correctly set the log file in odoo config file but i got nothing in the log file.
I dont know why.
this is lines that i put in config file :

...........
 logfile = /var/log/openerp/openerp-server.log
log_level = info

I also execute this commandes line:

bash#mkdir -p /var/log/openerp/
bash#touch /var/log/openerp/openerp-server.log
bash#chown openerp /var/log/openerp/openerp-server.log
bash#chmod 644 /var/log/openerp/openerp-server.log

Any help !!!!!!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

In V8 user=odoo, try this:

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

and you add (or other handler):

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

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất


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 !!!!!

 

Ảnh đại diện
Huỷ bỏ

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

Tác giả

how can i do that

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

Tác giả

done thanks for help.

Câu trả lời hay nhất

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


Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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'.


Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 4 25
6750
0
thg 7 20
3127
4
thg 10 16
35983
5
thg 7 24
38260
2
thg 12 23
19879